星期三, 9月 19, 2012

TStringList可以以特定字元做分割及排除空白即分割的情況

var
  ASource: PChar;
  AStr: String;
  astr1: string;
  ACount,i: Integer;
  AStrings: TStringList;
begin
  ASource := 'WorkerW||tooltips_class32||NotifyWnd||MSCTFIME UI||IME||ComboLBox||Auto-Suggest Dropdown||ATL:00409BA8||#43||';
  AStrings := TStringList.Create;
  Memo1.Clear;
  try



  ACount := ExtractStrings(['|'], [' ','#','.'], ASource, AStrings);
    For i:=0 to ACount-1 do
    begin
            Memo1.Lines.Add(AStrings[i]);
  end;