RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
SysUtils.AnsiStrScan Function

Returns a pointer to first occurrence of a character in a string.

Pascal
function AnsiStrScan(Str: PAnsiChar; Chr: AnsiChar): PAnsiChar; overload;
function AnsiStrScan(Str: PWideChar; Chr: WideChar): PWideChar; overload;
C++
PAnsiChar AnsiStrScan(PAnsiChar Str, AnsiChar Chr);
PWideChar AnsiStrScan(PWideChar Str, WideChar Chr);

Call AnsiStrScan to obtain a pointer to the first occurrence of Chr in Str. If Chr does not occur in Str, AnsiStrScan returns nil (Delphi) or NULL (C++). The null terminator is considered to be part of the string. 

Unlike the StrScan function, AnsiStrScan works with multi-byte character systems (MBCS). 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!