RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
SysUtils.StrPos Function

Returns a pointer to the first occurrence of STR2 in STR1.

Pascal
function StrPos(const Str1: PChar; const Str2: PChar): PChar;
C++
const char * StrPos(const const char * Str1, const const char * Str2);

SysUtils

StrPos returns a pointer to the first occurrence of Str2 in Str1. If Str2 does not occur in Str1, StrPos returns nil (Delphi) or NULL (C++).

Note: If the source string contains international characters, use AnsiStrPos instead.
 

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