Test if the string contains one or more instances of a test char
| Return Type | Function name | Arguments |
|---|---|---|
| bool | hzString::Contains | (const char,) |
Declared in file: hzString.h
Defined in file : hzString.cpp
Function Logic:
Function body:
bool hzString::Contains (const char c)
{
// Test if the string contains one or more instances of a test char
//
// Arguments: 1) c The char to test for
//
// Returns: True If the test char exists within the string
// False otherwise
_hzfunc("hzString::Contains(char)") ;
if (!m_addr)
return false ;
_strItem* thisCtl ; // This string's control area
const char* i ; // Pointer into string data
uint32_t len ; // Lenth of this string
thisCtl = _strXlate(m_addr) ;
i = (char*) thisCtl->_data() ;
len = Length() ;
for (; len ; len--)
{
if (i[len] == c)
return true ;
}
return false ;
}