procedure ROT13(AStrLst: TStringList);
var
i, j: integer;
c: char;
AStr: string;
s: string;
begin
for i := 0 to AStrLst.Count - 1 do begin
AStr := AStrLst[i];
s := '';
for j := 1 to Length(AStr) do begin
c := AStr[j];
if (((c >= 'A') AND (c <= 'M')) OR ((c >= 'a') AND (c <= 'm'))) then
c := chr(ord(c) + 13)
else if (((c >= 'N') AND (c <= 'Z')) OR ((c >= 'n') AND (c <= 'z'))) then
c := chr(ord(c) - 13);
s := s + c;
end;
AStrLst[i] := s;
end;
end;
|