Function help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Function help (
/showthread.php?tid=472533)
Function help -
Whizion - 29.10.2013
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.
Re: Function help -
Pottus - 29.10.2013
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;
}
Re: Function help -
Whizion - 29.10.2013
Thank you very much.