// antes function RemoverNaoNumericos(const S: string): string; var DIdx: Integer; SIdx: Integer; begin SetLength(Result, Length(S)); DIdx := 0; for SIdx := 1 to Length(S) do if S[SIdx] in ['0'..'9'] then begin Inc(DIdx); Result[DIdx] := S[SIdx] end; SetLength(Result, DIdx) end; // hoje function TLibSGNStrings.RemoverNaoNumericos(ATexto: string): string; var C: Char; begin Result := EmptyStr; for C in ATexto do Result := Result + IfThen(C.IsDigit,C); end;