System.SysUtils.StrPos

From Appmethod Libraries
Jump to: navigation, search

Object Pascal

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 */;

Properties

Type Visibility Source Unit Parent
function public
System.SysUtils.pas
System.SysUtils.hpp
System.SysUtils System.SysUtils

Description

Warning: Ansi version of StrPos is deprecated. Please use AnsiStrings unit.

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 (Object Pascal) or NULL (C++).

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

See Also

Code Examples