Convert textual representation of a month-rule (eg from a config file) into a hzMonthrule enum value.
| Return Type | Function name | Arguments |
|---|---|---|
| hzMonthrule | Str2Monthrule | (hzString&,) |
Declared in file: hzCron.h
Defined in file : hzCron.cpp
Function Logic:
Function body:
hzMonthrule Str2Monthrule (hzString& R)
{
// Category: Config
//
// Convert textual representation of a month-rule (eg from a config file) into a hzMonthrule enum value.
//
// Arguments: 1) R String assumed to be the name of a valid hzMonthrule value
//
// Returns: Enum hzMonthrule
uint32_t nIndex ; // Monthrule iterator
if (!R)
return HZMONTHRULE_INVALID ;
for (nIndex = 0; _hzGlobal_Monthrules[nIndex] ; nIndex++)
{
if (R == _hzGlobal_Monthrules[nIndex])
return (hzMonthrule) nIndex ;
}
return HZMONTHRULE_INVALID ;
}