reversePos

reversePos(substr: String): Integer;

The reversePos method of the String primitive type returns the position of the last occurrence of the substring specified in the substr parameter in the receiving string.

The character search is case-sensitive.

The following example shows the use of the reversePos method.

vars
    stringValue : String;
begin
    stringValue := "Reverse position example";
    write stringValue.reversePos('pos');      // Outputs 9
end;