Advertisement
BatisCorleone

[ func ] FoundBannedChar(s[])

Jun 1st, 2015
308
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.50 KB | None | 0 0
  1. //Character Checker v1.0 by BatisCorleone
  2. stock FoundBannedChar(s[])
  3. {
  4.     for(new i;i<strlen(s);i++)
  5.     {
  6.         switch(s[i])
  7.         {
  8.             case 32,33,35,36,43..57,60..63,65..90,91,93,97..122: continue;
  9.             default : return true;
  10.         }
  11.     }
  12.     return false;
  13. }
  14. //This stock enables these characters : 0-9,a-z,A-Z,!#$+,-/<=>?[]
  15. //Usage of this stock : TextDraws which can be written or edited by a player.
  16. //return true - Found banned Char
  17. //return false - No banned Char found - the string is O.K.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement