RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
AnsiStringBase::AnsiPos Method

Returns the index at which the specified substring begins.

Pascal
function AnsiPos(const subStr: AnsiStringBase&): Integer;
C++
__fastcall int AnsiPos(const AnsiStringBase& subStr) const;

Returns the index in the System::AnsiStringBase::AnsiStringBase at which the substring subStr begins, where 1 is the first character in the string, 2 is the second character, and so on. If the substring is not contained in the System::AnsiStringBase::AnsiStringBase, Pos returns 0. This member function is the same as Pos but supports multibyte character strings.

Note: See ByteType for more information about multibyte characters.
 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!