Difference between revisions of "StrPos"
(Created page with "===From the Scripting Manual=== ''function StrPos(const Substr, S: string): integer;'' '''Parameter Info:''' Substr (String): Substring to search for. S (String): Stri...") |
(No difference)
|
Latest revision as of 12:17, 15 August 2012
From the Scripting Manual
function StrPos(const Substr, S: string): integer; Parameter Info: Substr (String): Substring to search for. S (String): String to search in. Description: This function will return the integer position of the first occurence of (Substr) in (S). Note that the use of StrPos has the same result as the function Pos, except that it is slower. We Advise the use of Pos over StrPos.
Examples
var
MyString: string;
begin
MyString := 'foobar';
StrPos('bar',MyString); //4
StrPos('f',MyString); //1
StrPos('o',MyString); //2
end;