begin
if (ch in ['a'..'z', 'а'..'я']) then
result := chr(ord(ch) - 32)
else
result := ch;
end;function LoCase(ch: char): char;
begin
if (ch in ['A'..'Z', 'А'..'Я']) then
result := chr(ord(ch) + 32)
else
result := ch;
end;function UpperCase(s: string): string;
var
i: integer;
begin
result := s;
for i := 1 to length(result) do
if (result[i] in ['a'..'z', 'а'..'я']) then
result[i] := chr(ord(result[i]) - 32);
end;function LowerCase(s: string): string;
var
i: integer;
begin
result := s;
for i := 1 to length(result) do
if (result[i] in ['A'..'Z', 'А'..'Я']) then
result[i] := chr(ord(result[i]) + 32);
end;procedure TForm1.Button1Click(Sender: TObject);
const
s = 'zZцЦ.';
var
i: integer;
begin
Form1.Caption := 'DownCase: ';
for i := 1 to Length(s) do
Form1.Caption := Form1.Caption + LoCase(s[i]);
Form1.Caption := Form1.Caption + ' UpCase: ';
for i := 1 to Length(s) do
Form1.Caption := Form1.Caption + UpCase(s[i]);
Form1.Caption := Form1.Caption + ' UpperCase: ' + UpperCase(s);
Form1.Caption := Form1.Caption + ' LowerCase: ' + LowerCase(s);
end;