Determine if a token is alphanumeric
| Return Type | Function name | Arguments |
|---|---|---|
| bool | IsAlphaNum | (const char*,) |
Declared in file: hzTextproc.h
Defined in file : hzTypes.cpp
Function Logic:
Function body:
bool IsAlphaNum (const char* tok)
{
// Category: Text Processing
//
// Determine if a token is alphanumeric
//
// Arguments: 1) tok The token
//
// Returns: True If token is alphanemeric
// False If string of zero length or contains non alphanumeric chars
_hzfunc("IsAlphaNum") ;
const char* i ; // Input string iterator
if (!tok || !tok[0])
return false ;
for (i = tok ; *i ; i++)
{
if (chartype[*i] & (CTYPE_ALPHA | CTYPE_DIGIT))
continue ;
return false ;
}
return true ;
}