随笔 - 2146  文章 - 97 评论 - 11765 trackbacks - 253

举例:
var
  s: string;
  i: Integer;
begin
  s := 'Delphi'#10'2007';
  ShowMessage(IntToStr(Length(s)));    {11}

  s := AdjustLineBreaks(s);
  //s := AdjustLineBreaks(s,tlbsCRLF); {tlbsCRLF 是默认的}
  ShowMessage(IntToStr(Length(s)));    {12, 这时 s = 'Delphi'#13#10'2007'}

  s := AdjustLineBreaks(s,tlbsLF);
  ShowMessage(IntToStr(Length(s)));    {11, 这时 s = 'Delphi'#10'2007'}
end;

SysUtils 单元下的公用函数目录

posted on 2008-03-31 21:42  万一  阅读(...)  评论(... 编辑 收藏