[Overview][Constants][Types][Classes][Procedures and functions][Variables] | Reference for unit 'sysutils' (#rtl) |
Return a pointer to the last character of a string.
Source position: sysstrh.inc line 92
function AnsiLastChar( |
const S: String |
):PChar; |
This function returns a pointer to the last character of S. Since multibyte characters are not yet supported, this is the same as @S[Length(S)]).
None.
|
Return a pointer to the last character of a string. |
Program Example52; { This program demonstrates the AnsiLastChar function } Uses sysutils; Var S : AnsiString; L : Longint; Begin S:='This is an ansistring.'; Writeln ('Last character of S is : ',AnsiLastChar(S)); L:=Longint(AnsiLastChar(S))-Longint(@S[1])+1; Writeln ('Length of S is : ',L); End.
No notes exist for this page yet.