RAD Studio VCL Reference
SysUtils.AnsiStrLastChar Function

Returns a pointer to the last character in a null-terminated string.

function AnsiStrLastChar(P: PAnsiChar): PAnsiChar; overload;
function AnsiStrLastChar(P: PWideChar): PWideChar; overload;
PAnsiChar AnsiStrLastChar(PAnsiChar P);
PWideChar AnsiStrLastChar(PWideChar P);

Call AnsiStrLastChar to obtain a pointer to the last full character in a null-terminated sequence. When working with multi-byte character sets (MBCS), the last character will not be the same as the last char value if the last two bytes represent a single double byte character. 


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