antiblock
https://arwen2.global/
  • Chatbox

    Did you check out our Discord? https://discord.gg/FFdvMjk9xA
    You don't have permission to chat.
    Load More
Sign in to follow this  
V¡®u§

Função para remover caracteres e deixar apenas números em uma string (funcionando no delphi 2010)

1 post in this topic

function SoNumeros(Const Texto:String):String;

//

// Remove caracteres de uma string deixando apenas numeros

//

var

I: integer;

S: string;

begin

S := '';

for I := 1 To Length(Texto) Do

begin

if (Texto in ['0'..'9']) then

begin

S := S + Copy(Texto, I, 1);

end;

end;

result := S;

end;

Share this post


Link to post
Share on other sites
antiblock
Elveron

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this