reverse

reverse(): StringUtf8;

The reverse method of the StringUtf8 primitive type returns a string consisting of the receiving string with the position of all characters reversed. For example, a string that contains "abcde" is returned as "edcba".

The following example shows the use of the reverse method.

vars
    str8 : StringUtf8;
begin
    str8 := 'abcde';
    write str8.reverse;   // Outputs 'edcba'
end;