{_parser.pas by XOR[uinc],[overkill],[mechanicalanimals].}
unit _parser;
interface
uses
 classes;
type
 tparser = class(tcomponent);
function parser(str:string):tstringlist;
implementation
function parser(str:string):tstringlist;
var
 s : tstringlist;
 i,st : integer;
 sp : boolean;
begin
 st := 0;
 sp := true;
 s := tstringlist.create;
 s.add('');
for i := 1 to length(str) do
begin
if str[i] = ' ' then //you can change ' ' to anything
begin
if not sp then
begin
 inc(st);
 s.add('');
end;
 sp := true;
end
else
begin
 sp := false;
 s.strings[st] := s.strings[st] + str[i];
end;
end;
if sp then s.delete(s.count-1);
 result:=s;
end;
end.
