Delphi 2009 新增单元 Character[1]: ToUpper、ToLower - 字符与字符串的大小写转换

uses Character;
{Character.ToUpper}
procedure TForm1.Button1Click(Sender: TObject);
var
  c: Char;
  str: string;
begin
  c := ToUpper(‘a‘);
  str := ToUpper(‘Delphi‘);
  ShowMessageFmt(‘%s, %s‘, [c, str]); {A, DELPHI}
end;

{Character.ToLower}
procedure TForm1.Button2Click(Sender: TObject);
var
  c: Char;
  str: string;
begin
  c := ToLower(‘A‘);
  str := ToLower(‘Delphi‘);
  ShowMessageFmt(‘%s, %s‘, [c, str]); {a, delphi}
end;