Anonymous user
Determine if a string is numeric: Difference between revisions
Determine if a string is numeric (view source)
Revision as of 00:17, 28 February 2009
, 15 years ago→{{header|C}}
m (→{{header|C}}: strtol -> strtod (task asks for floating point too, strtol did not do it)) |
|||
Line 110:
=={{header|C}}==
Returns true (non-zero) if character-string parameter represents a signed or unsigned
<lang c>
Line 116:
int isNumeric (const char * s)
{
if (
return 0;
char * p;
strtod (s, &p);
return
}
</lang>
|