5,388
社区成员
发帖
与我相关
我的任务
分享
procedure TF7_proverb.SplitString(Source,Deli:string; var AList:TStringList);
var
EndOfCurrentString:byte;
begin
try
while Pos(Deli, Source)>0 do
begin
EndOfCurrentString := Pos(Deli, Source);
AList.add(Copy(Source, 1, EndOfCurrentString - 1));
Source:=Copy(Source, EndOfCurrentString + length(Deli), length(Source) - EndOfCurrentString);
end;
AList.Add(source);
except
end;
end;
var
AList: TStringList;
begin
AList := TStringList.Create;
try
SplitString('......', '..', AList);
......
finally
AList.Free;
end;
end;