| Return Type | Function name | Arguments |
|---|---|---|
| bool | CstrContainsI | (const char*,const char*,) |
Declared in file: hzTextproc.h
Defined in file : hzTextproc.cpp
Function Logic:
Function body:
bool CstrContainsI (const char* cpHaystack, const char* cpNeedle)
{
const char* i ;
uint32_t len ;
char lower ;
char upper ;
if (!cpHaystack || !cpHaystack[0]|| !cpNeedle || !cpNeedle[0])
return false ;
lower = tolower(cpNeedle[0]);
upper = toupper(cpNeedle[0]);
len = strlen(cpNeedle) ;
for (i = cpHaystack ; *i ; i++)
{
if (*i != lower && *i != upper)
continue ;
if (!CstrCompareI(i, cpNeedle, len))
return true ;
}
return false ;
}