Show: Delphi
C++
Display Preferences
System.SysUtils.StrPos
From XE2 API Documentation
Delphi
function StrPos(const Str1, Str2: PAnsiChar): PAnsiChar; function StrPos(const Str1, Str2: PWideChar): PWideChar;
C++
extern PACKAGE char * __fastcall StrPos(const char * Str1, const char * Str2)/* overload */;
Contents |
Properties
| Type | Visibility | Source | Unit | Parent |
|---|---|---|---|---|
| function | public | System.SysUtils.pas System.SysUtils.hpp |
System.SysUtils | System.SysUtils |
Description
Returns a pointer to the first occurrence of STR2 in STR1.
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.
See Also
Code Examples