Return TypeFunction nameArguments
intCstrFirstI(const char*,const char*,)

Declared in file: hzTextproc.h
Defined in file : hzTextproc.cpp

Function Logic:

0:START 1:!cpHaystack||!cpHaystack[0]||!cpNeedle||!cpNeedle[0] 2:Return false 3:tolower lower toupper upper n 4:cpHaystack[n]; 5:cpHaystack[n]!=lower&&cpHaystack[n]!=upper 6:!CstrCompareI(cpHaystack+n,cpNeedle) 7:Return n 8:Return -1

Function body:

int CstrFirstI (const char* cpHaystack, const char* cpNeedle)
{
   uint32_t    n ;
   char        lower ;
   char        upper ;
   if (!cpHaystack || !cpHaystack[0]|| !cpNeedle || !cpNeedle[0])
       return false ;
   lower = tolower(cpNeedle[0]);
   upper = toupper(cpNeedle[0]);
   for (n = 0; cpHaystack[n] ; n++)
   {
       if (cpHaystack[n] != lower && cpHaystack[n] != upper)
           continue ;
       if (!CstrCompareI(cpHaystack + n, cpNeedle))
           return n ;
   }
   return -1;
}