UPCASE.PAS 550 B

123456789101112131415161718
  1. Uses CRT;
  2. Var
  3. s1,s2 : string;
  4. {-----------------------------------------------------}
  5. Function UpCas(s1 : string;) : string;
  6. Var
  7. j : byte;
  8. Begin
  9. for j := 1 to length(s1) do
  10. begin
  11. if ord(s1[j]) in [128..175, 224..239] then begin
  12. if ord(s1[j]) in [160..175] then UpCas[j] := Chr(ord(s1[j]) - 32);
  13. if ord(s1[j]) in [224..239] then UpCas[j] := Chr(ord(s1[j]) - 80);
  14. end
  15. else UpCas[j] := UpCase(s1[j]);
  16. end;
  17. end; {UpCas}
  18. {------------------------------------------------------------}