FindString()

Syntax

Position = FindString(String$, StringToFind$ [, StartPosition [, Mode]])
Description
Find the 'StringToFind$' within the given 'String$'.

Parameters

String$ The string to use.
StringToFind$ The string to find.
StartPosition (optional) The start position to begin the search. The first valid character index is 1. If this parameter isn't specified, the whole string is searched.
Mode (optional) It can be one of the following values:
  #PB_String_CaseSensitive: case sensitive search (a=a) (default).
  #PB_String_NoCase       : case insensitive search (A=a).

Return value

Returns the position (in character) of the string to find, or zero is the string isn't found. The first character index is 1.
  Debug FindString("PureBasic", "Bas") ; will display 5

Supported OS

All

<- EscapeString() - String Index - FormatNumber() ->