10 lines
195 B
C
10 lines
195 B
C
#include <ctype.h>
|
|
#include <stdlib.h>
|
|
int isNumeric (const char * s)
|
|
{
|
|
if (s == NULL || *s == '\0' || isspace(*s))
|
|
return 0;
|
|
char * p;
|
|
strtod (s, &p);
|
|
return *p == '\0';
|
|
}
|