procedure MyUpCase(var s: string);{приведение к верхнему регистру всей строки}
var
i: byte;
begin
for i := 1 to length(s) do
if s[i] in ['a'..'z'] then s[i] := UpCase(s[i])
else if s[i] in ['а'..'п'] then s[i] := chr(ord(s[i]) - 32)
else if s[i] in ['р'..'я'] then s[i] := chr(ord(s[i]) - 80)
else if s[i] = 'ё' then s[i] := 'Ё';
end;
procedure LowCase(var s: string);{приведение к нижнему регистру}
var
i: byte;
begin
for i := 1 to length(s) do
if s[i] in ['A'..'Z', 'А'..'П'] then s[i] := chr(ord(s[i]) + 32)
else if s[i] in ['Р'..'Я'] then s[i] := chr(ord(s[i]) + 80)
else if s[i] = 'Ё' then s[i] := 'ё';
end;
procedure MyDelete(var s: string);
const
cs = [' ', '.', ',', ':', ';', '!', '?'];
var
i: integer;
begin
for i := length(s) downto 1 do
if s[i] in cs then
delete(s, i, 1);
end;
end.
myunit;
interface
procedure MyUpCase(var s: string);
procedure LowCase(var s: string);
procedure MyDelete(var s: string);
implementation
procedure MyUpCase(var s: string);{приведение к верхнему регистру всей строки}
var
i: byte;
begin
for i := 1 to length(s) do
if s[i] in ['a'..'z'] then s[i] := UpCase(s[i])
else if s[i] in ['а'..'п'] then s[i] := chr(ord(s[i]) - 32)
else if s[i] in ['р'..'я'] then s[i] := chr(ord(s[i]) - 80)
else if s[i] = 'ё' then s[i] := 'Ё';
end;
procedure LowCase(var s: string);{приведение к нижнему регистру}
var
i: byte;
begin
for i := 1 to length(s) do
if s[i] in ['A'..'Z', 'А'..'П'] then s[i] := chr(ord(s[i]) + 32)
else if s[i] in ['Р'..'Я'] then s[i] := chr(ord(s[i]) + 80)
else if s[i] = 'Ё' then s[i] := 'ё';
end;
procedure MyDelete(var s: string);
const
cs = [' ', '.', ',', ':', ';', '!', '?'];
var
i: integer;
begin
for i := length(s) downto 1 do
if s[i] in cs then
delete(s, i, 1);
end;
end.