Top Prev Next Up Down

ReverseC

Reverse the order of characters in the text.

function reverseC(s:CFix) return CFix ;
function reverseC(s:CVar) return CVar ;
function reverseC(s:String) return String ;

Example:

[1] Ada.Text_IO.Put_Line ( “reverseC(“"Borgå”").>” & reverseC("Borgå") & “<”);
  result: reverseC("Borgå").>ågroB<
  In UTF-8 the unit “å” has a length of two bytes or two Ada characters. It is important that the order is preserved when the text is reversed.