String.First

Parent Previous Next

String.First.

If the passed value is found in the string - using case sensitive comparing, then it returns the position as an index (0 based) of the first character, otherwise it returns -1.


Syntax.


 First(String value) : Integer

 


Example:


 Integer i;

 i := ("abcdef ABCDEF").First("cd");  //Now i == 2;

 i := ("abcdef ABCDEF").First("EFG"); //Now i == -1;