RPos¶
Find last occurrence of substring or character in a string.
Declaration¶
Source position: strutils.pp line 202
function RPos(c: AnsiChar; const S: AnsiString) : SizeInt; overload; overload;
function RPos(c: UnicodeChar; const S: UnicodeString) : SizeInt
; overload; overload;
function RPos(const Substr: AnsiString; const Source: AnsiString)
: SizeInt; overload; overload;
function RPos(const Substr: UnicodeString; const Source: UnicodeString)
: SizeInt; overload; overload;
Description¶
RPos looks in S for the character C or the string SubStr. It starts looking at the end of the string, and searches towards the beginning of the string. If a match is found, it returns the position of the match. If no match is found, 0 is returned.