System.SysUtils.StrPos
De RAD Studio API Documentation
Delphi
function StrPos(const Str1, Str2: PAnsiChar): PAnsiChar; function StrPos(const Str1, Str2: PWideChar): PWideChar;
C++
extern DELPHI_PACKAGE char * __fastcall StrPos _DEPRECATED_ATTRIBUTE1("Moved to the AnsiStrings unit") (const char * Str1, const char * Str2)/* overload */;
Propriétés
| Type | Visibilité | Source | Unité | Parent |
|---|---|---|---|---|
| function | public | System.SysUtils.pas System.SysUtils.hpp |
System.SysUtils | System.SysUtils |
Description
Renvoie un pointeur sur la première occurrence de STR2 dans STR1.
StrPos renvoie un pointeur sur la première occurrence de Str2 dans Str1. Si Str2 ne se produit pas dans Str1, StrPos renvoie nil (Delphi) ou NULL (C++).
Remarque : Si la chaîne source contient des caractères internationaux, utilisez plutôt AnsiStrPos.