Test if supplied string is of the form of a valid IP address (four numbers between 0 and 255 separated by a period)
| Return Type | Function name | Arguments |
|---|---|---|
| bool | IsIPAddr | (const char*,) |
Declared in file: hzTextproc.h
Defined in file : hzIpaddr.cpp
Function Logic:
Function body:
bool IsIPAddr (const char* cpIpa)
{
// Category: Text Processing
//
// Test if supplied string is of the form of a valid IP address (four numbers between 0 and 255 separated by a period)
//
// Arguments: 1) The string to be tested
//
// Returns: True If the supplied string amounts to a valid IP address
// False If it doesn't
uint32_t nVal ; // 32-bit IP address value
return IsIPAddr(nVal, cpIpa) ;
}