Let's say you have a string 'testing string reverse' than String_reverse would result in 'esrever gnirts gnitset'.
~~~~~~~~~~~~~~~~~~~~~~~~~
Function String_Reverse(S : String): String;
Var
i : Integer;
Begin
Result := '';
For i := Length(S) DownTo 1 Do
Begin
Result := Result + Copy(S,i,1) ;
End;
End;
~~~~~~~~~~~~~~~~~~~~~~~~~
p.s.
Or, if you have Delphi 6+, you an use the ReverseString RTL function.
Delphi tips navigator:
» Search And Replace
« Left, Mid, Right String

