Function help
#1

I need a function like this:

OnlyAZ(string[]);

It would check if the string contains only letters from A to Z. So no special characters etc.

It should be case-insensitive.

Does anyone have something similar? Some snippet or something?

Thank you.
Reply
#2

pawn Код:
stock OnlyAZ(text[])
{
    new len = strlen(text);
    for(new i = 0; i < len; i++)
    {
        if((text[i] >= 65 && text[i] <= 90) || (text[i] >= 97 && text[i] <= 122)) continue;
        return 0;
    }
    return 1;
}
Reply
#3

Thank you very much.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)