procedure KillSpace(var SS : string);
begin
while Pos(' ',SS)>0 do begin
SS := Copy(SS,1,Pos(' ',SS) - 1)+Copy(SS,Pos(' ',SS)+1,Length(SS)-Pos(' ',SS));
end;
end;
1. StrStr perhaps,
I do not remember other but it's easy.
2.Trim(const;TrimLeft.TrimRight
for i:= s.lengh downto 1 do
begin
if s = ' ' then
begin
result := true;
exit;
end
end;
result := false;
write a procedure to strip space!
function StripSpace(S: string):string ;
var
i: integer ;
begin
i:= Length(s);
While (Length(s)>0)and(s=' ') do begin
Delete(S,i,1);
Dec(i);
end;
i:=1;
While (Length(s)>0)and(s=' ') do begin
Delete(S,i,1);
end;
Result:= s;
end ;