Skip to content

RPosex

Find last occurrence substring or character in a string, starting at a certain position

Declaration

Source position: strutils.pp line 179

  function RPosEX(C: Char; const S: AnsiString; offs: Cardinal) : SizeInt
                 ;  Overload;
  function RPosex(const Substr: AnsiString; const Source: AnsiString; 
                 offs: Cardinal) : SizeInt;  Overload;
  function RPosEX(C: UnicodeChar; const S: UnicodeString; offs: Cardinal)
                  : SizeInt;  Overload;
  function RPosex(const Substr: UnicodeString; 
                 const Source: UnicodeString; offs: Cardinal) : SizeInt
                 ;  Overload;

Description

RPos looks in S for the character C or the string SubStr. It starts looking at position Offs (counted from the start of the string), and searches towards the beginning of the string. If a match is found, it returns the position of the match.

See also

Name Description
RPos Find last occurrence of substring or character in a string