Determine if a string consists entirely of digits
| Return Type | Function name | Arguments |
|---|---|---|
| bool | IsAllDigits | (const char*,) |
Declared in file: hzTextproc.h
Defined in file : hzTypes.cpp
Function Logic:
Function body:
bool IsAllDigits (const char* tok)
{
// Category: Text Processing
//
// Determine if a string consists entirely of digits
//
// Arguments: 1) tok The token
//
// Returns: True If token is alphanemeric
// False If string of zero length or contains non digit chars
const char* i ; // Input string iterator
if (!tok || !tok[0])
return false ;
for (i = tok ; *i && *i >&eq; ''0''&&*i <&eq; ''9'';i++) ;
return *i ? false : true ;
}