Hola...
Así rápidamente se me ocurren dos formas, usando
StringReplace:
Código Delphi
[-]
Cadena := StringReplace(Cadena, ' ', ' ', [rfReplaceAll]);
o haciendo una función:
Código Delphi
[-]
function RemoveBlanks(const Str: string): string;
var
I: Integer;
FirstBlank: Boolean;
begin
Result := '';
for I := 1 to Length(Str) do
begin
if Str[i] <> ' ' then
begin
Result := Result + Str[i];
FirstBlank := True;
end
else
if FirstBlank then
begin
FirstBlank := False;
Result := Result + Str[i]
end
end
end;
Saludos...