Advertisement
DraKiNs

[COD] IsNumeric V2

Jun 26th, 2011
658
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.49 KB | None | 0 0
  1. /*
  2.  *   IsNumeric V2
  3.  *      
  4.  *
  5.  * @author    : DraKiNs
  6.  * @date      : 04 Jul 2011
  7.  * @update    : 11 Jul 2011
  8.  * @thanks    : DracoBlue & Garfield
  9.  * @Return    : if string is numeric return true, else false (accept negative numbers)
  10. */
  11.  
  12. IsNumeric(const string[])
  13. {
  14.         for (new i = (string[0] == 0x2D && string[1] ? 1 : 0),j = strlen(string); i < j; i++)
  15.         {
  16.                 if (string[i] > 0x39 || string[i] < 0x30) return false;
  17.         }
  18.         return true;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement