#8

Quote:
Originally Posted by XpDeviL
Посмотреть сообщение
PHP код:
stock isNumeric(const string[])
{
 new 
length=strlen(string);
 if (
length==0) return false;
 for (new 
0lengthi++)
  {
   if (
      (
string[i] > '9' || string[i] < '0' && string[i]!='-' && string[i]!='+'// Not a number,'+' or '-'
       
|| (string[i]=='-' && i!=0)                       // A '-' but not at first.
       
|| (string[i]=='+' && i!=0)                       // A '+' but not at first.
     
) return false;
  }
 if (
length==&& (string[0]=='-' || string[0]=='+')) return false;
 return 
true;

fucking awesome thanks man working prefct +rep
Reply


Messages In This Thread
Help - by astanalol - 06.04.2017, 20:20
Re: Help - by khRamin78 - 06.04.2017, 20:29
Re: Help - by astanalol - 06.04.2017, 20:53
Re: Help - by astanalol - 07.04.2017, 19:38
Re: Help - by XpDeviL - 07.04.2017, 21:01
Re: Help - by astanalol - 07.04.2017, 21:12
Re: Help - by XpDeviL - 07.04.2017, 21:16
Re: Help - by astanalol - 07.04.2017, 21:28

Forum Jump:


Users browsing this thread: 2 Guest(s)