举例:
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  万一  阅读(2239)  评论(0编辑  收藏  举报