All pastes #12520 Raw Edit

Untitled

public text v1 · immutable
#12520 ·published 2005-05-24 14:56 UTC
rendered paste body
Function StrCount(S:String):Integer;
  Var i:integer;
begin
i:=0;
while pos(' ',s) > 0 do
  begin
  inc(i);
  delete(s,pos(' ',s),1);
  end;
strcount:=i;
end;


Function SpilitStr(S:String;Pos:integer):String;
{* <HI Fuck You> *}
  Var i:integer;
      Q:integer;
begin
q:=StrCount(S);
if (q <> 0) and (pos <= q) then
  begin
  i:=1;
  while i <> pos do
    begin
    s:=copy(s,pos(' ',s)+1,length(s));
    inc(i);
    end
  if pos(' ',s) > 0 then
    result:=copy(s,1,pos(' ',s)-1));
  else
    result:=s;
  end
else
  result:='';
end;