somente numeros da string

Delphi

26/01/2007

[color=red:1ec6b31dd1]Tópico bloqueado por Massuda Tópico duplicado. Por favor, mantenha a discussão no tópico original... http://forum.clubedelphi.net/viewtopic.php?t=84111[/color:1ec6b31dd1]

tenho uma string ´01256252LH21O´, como deixar somente os numeros?


Aleriopreto

Aleriopreto

Curtidas 0

Respostas

Rjun

Rjun

26/01/2007

function SomenteNumero(Palavra: string): string;
var
  i: Integer;
begin
  Result := ´´;
  for i := 1 to Length(Palavra) do
    if (Palavra[i] in [´0´..´9´]) then
      Result := Result + Palavra[i];
end;



GOSTEI 0
POSTAR