Function to reverse a String, for example, the string "Delphi" will become "ihpleD".
Function Declaration:
Strback function (IVI: String): String;
var
l: Integer;
begin
for i: = Length (IVI) downto 1 do
begin
Result: = Result + IVI [l];
end;
end;
Examples of Implementation:
procedure TForm1.Button1Click (Sender: TObject);
begin
Edit2.Text: = Strback (Edit1.Text);
end;
No comments:
Post a Comment