16,748
社区成员
发帖
与我相关
我的任务
分享
var
flist: TStringList;
i: Integer;
str, s,s2, s3: string;
begin
flist := TStringList.create;
str := '中国银行';
s := '601988 中国银行'; //TAB键分割
s2 := '';
ExtractStrings([' ', ',', ';'], [], PChar(s), flist);
if flist.count > 1 then
begin
s3 := trim(flist.Strings[1]);
if (str = s3) then //( or (Pos(str, s3) > 0) or (Pos(s3, str) > 0)) then
begin
s2 := flist.Strings[0];
end;
end;
ShowMessage(s2);
flist.Free;
end;