Delphi Sources

Перевернуть строку



Автор: ___Nikolay
WEB-сайт: http://delphiworld.narod.ru

// Перевернуть строку
function ReverseString(s: string): string;
var
  i: integer;
begin
  Result := '';
  if Trim(s) <> '' then
    for i := Length(s) downto 1 do
      Result := Result + s[i];
end;