16,746
社区成员




function TForm2.split(s,sub:string):TStringList;
begin
Result:=TStringList.Create;
while Pos(sub,s)>0 do
begin
Result.Add(Copy(s,1,Pos(sub,s)-1));
Delete(s,1,Pos(sub,s)+Length(sub)-1);
end;
Result.Add(s);
//SHowmessage(IntToStr(Result.Count));
end;
procedure TForm2.Button1Click(Sender: TObject);
begin
Showmessage(split(': FA15 : 644841 : 191199 : EAG / CN : K',': ').Text);
//Showmessage(split(' : FA15 : 644841 : 191199 EAG / CN : : K',' : ').Text);
end;