1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
function TfmXAMException.Split(Source, Deli: string): TStringlist;
var
EndOfCurrentString: integer;
begin
result:= TStringList.Create;
if not length(source) >0 then exit;
repeat
EndOfCurrentString := Pos(Deli, Source);
if (EndOfCurrentString <= 0) then
begin
EndOfCurrentString:=0;
result.add(Source);
end
else
result.add(Copy(Source, 1, EndOfCurrentString - 1));
Source := Copy(Source, EndOfCurrentString + length(Deli), length(Source) - EndOfCurrentString);
until EndOfCurrentString = 0;
end; |
Partager