Es ist wirklich einfach ,aber vll braucht es jemand.
PHP Code:
BOOL IsNumeric( CHAR *txt )
{
BOOL STATUS = TRUE;
unsigned i = NULL;
while( STATUS && i < strlen( txt ) )
{
switch( txt[i] )
{
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
case '.': // maybe float?!
// everything ok
break;
default:
// w8, this shit aint numeric
STATUS = FALSE;
}
i++;
}
return STATUS;
}






