Advertisement
DraKiNs

[COD] IsValidString

Aug 30th, 2011
299
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.51 KB | None | 0 0
  1. /*
  2.  *  Author: Bruno da Silva
  3.  * www.ips-team.blogspot.com
  4. */
  5.  
  6. /*
  7.     - isValidString(string);
  8.     Return true to string valid, else false
  9.  
  10.   Example:
  11.    ¬£³¢3 = False
  12.    ABC 123 = True
  13.  
  14. */
  15. isValidString(string[])
  16. {
  17.     for(new x = 0; string[x]; ++x) switch(string[x]) {
  18.         case 0x20           : continue;
  19.         case 0x41 .. 0x54   : continue;
  20.         case 0x30 .. 0x39   : continue;
  21.         case 0x61 .. 0x7A   : continue;
  22.         default             : return false;
  23.     }
  24.     return true;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement