Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- @Função: Verificar se uma string é numérica
- @Créditos: [iPs]SuYaNw
- */
- stock IsNumeric(al[])
- {
- if(strlen(al) <= 1) return false;
- new size = strlen(al);
- for(new i = 0; i != size; i++)
- {
- if('9' >= (al[i]) <= '0')
- {
- return true;
- }
- }
- return false;
- }
- // Uso:
- if(IsNumeric(myString))
- {
- print("ela é numerica");
- }
- else
- {
- print("ela não é numérica");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement