Examples:
|
string s = "reverse.exw" ?s -- "reverse.exw"
s[3..6] = reverse(s[3..6]) ?s -- "resreve.exw"
s[4..-7] = reverse(s[4..-7]) ?s -- "reserve.exw"
?reverse({1,3,5,7}) -- {7,5,3,1}
?reverse({{1,2,3}, {4,5,6}}) -- {{4,5,6}, {1,2,3}}
?reverse({99}) -- {99}
?reverse({}) -- {}
|
Technicalia
|
Previous versions had a from_to parameter which has been removed, and there are no equivalents for Eu’s pFrom and
(0-based) pTo: just replace "s = reverse(s,{i,j})" with "s[i..j] = reverse(s[i..j])" in any rare cases said were used.
buultins/utfconv.e also contains the commented-out, untested, and as yet undocumented function unicode_reverse(), which
will or at least should reverse a unicode string while preserving combining characters.
|