containsLetters(string[])
#5

You could simply use the stock IsNumeric, to determine if the string is completely numeric, if it returns false, there are characters or letters in it.

Usage;
if(!IsNumeric(string))

pawn Код:
stock IsNumeric(str[])
{
    new ch, i;
    while ((ch = str[i++])) if (ch < '0' || ch > '9') return 0;
    return 1;
}
EDIT: Beaten twice in a row, both of you good job. I seriously need to refresh before posting.
Reply


Messages In This Thread
containsLetters(string[]) - by borba - 24.04.2011, 20:47
Re: containsLetters(string[]) - by Jefff - 24.04.2011, 20:50
Re: containsLetters(string[]) - by Vince - 24.04.2011, 20:51
Re: containsLetters(string[]) - by borba - 24.04.2011, 20:52
Re: containsLetters(string[]) - by playbox12 - 24.04.2011, 20:53

Forum Jump:


Users browsing this thread: 1 Guest(s)