Locates the position of a substring.
function AnsiPos(const Substr: string; const S: string): Integer;
int AnsiPos(const AnsiString Substr, const AnsiString S);
SysUtils
Call AnsiPos to obtain the byte offset of the Substr parameter, as it appears in the string S. For example, if Substr is the string "AB", and S is the string "ABCDE", AnsiPos returns 1. If Substr does not appear in S, AnsiPos returns 0.
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
|
What do you think about this topic? Send feedback!
|