//替換字符串列表中字符串
procedure StringsReplace(var S : TStrings; OldPattern, NewPattern: string; Flags: TReplaceFlags);
var i : integer;
???? tmpstr : string;
begin
?? for i := 0 to S.Count -1 do
?? begin
???? tmpstr := S[i];
???? s[i] := StringReplace(tmpstr, OldPattern, NewPattern, Flags);
?? end;
end;
//分割字符串,從網上搜索的也很好使
function SplitString(Source, Deli: string ): TStringList;stdcall;
var
?? EndOfCurrentString: byte;
?? StringList:TStringList;
begin
?? StringList:=TStringList.Create;
?? while Pos(Deli, Source)>0 do
?? begin
???? EndOfCurrentString := Pos(Deli, Source);
???? StringList.add(Copy(Source, 1, EndOfCurrentString - 1));
???? Source := Copy(Source, EndOfCurrentString + length(Deli), length(Source) - EndOfCurrentString);
?? end;
?? Result := StringList;
?? StringList.Add(source);
end;