RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
AnsiString::Pos Method

Returns the index at which a specified substring begins.

Pascal
function Pos(const subStr: AnsiString&): Integer;
C++
__fastcall int Pos(const AnsiString& subStr) const;

System::AnsiString::Pos returns the index in the System::AnsiString::AnsiString at which the substring subStr begins, where 1 is the index of the first character, 2 is the index of the second character, and so on. If the substring is not contained in the System::AnsiString::AnsiString, System::AnsiString::Pos returns 0. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!