自己写。 function Inverted(Str: String): Stirng var ReStr: String; i: Integer; begin for i := Length(Str) downto 1 do ReStr := ReStr + Copy(Str, i, 1); Result:= ReStr; end;
UnitStrUtilsfunction ReverseString(const AText: string): string;DescriptionReverseString returns the string specified by AText with the characters in reverse order.Note: This method does not work with multibyte character sets.
function Inverted(Str: String): Stirng
var
ReStr: String;
i: Integer;
begin
for i := Length(Str) downto 1 do
ReStr := ReStr + Copy(Str, i, 1);
Result:= ReStr;
end;
Uses
strUtils
这个单元