17.01.2012, 16:21
pawn Код:
stock IsValidName(name[])
{
if(strlen(name) < 3) return 0;
new i, ch;
while ((ch = name[i++]) && ((ch == '(') || (ch == ')') || (ch == '$') || (ch == '.') || (ch == '=') || (ch == '@') || (ch == ']') || (ch == '[') || (ch == '_') || ('0' <= ch <= '9') || ((ch |= 0x20) && ('a' <= ch <= 'z')))) {}
return !ch;
}