RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
SysUtils.AnsiStrPos Function

Returns a pointer to the first occurrence of a substring.

Pascal
function AnsiStrPos(Str: PChar; SubStr: PChar): PChar;
C++
const char * AnsiStrPos(const char * Str, const char * SubStr);

SysUtils

Call AnsiStrPos to locate the first occurrence of SubStr in Str. If SubStr does not occur in Str, AnsiStrPos returns nil (Delphi) or NULL (C++). 

Unlike the StrPos function, AnsiStrPos works with multi-byte characters sets (MBCS). 

 

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