Return TypeFunction nameArguments
intCstrLastI(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 -1 3:tolower lower toupper upper n 4:cpHaystack[n]; 5:cpHaystack[n]!=lower&&cpHaystack[n]!=upper 6:!CstrCompareI(cpHaystack+n,cpNeedle) 7:posn 8:Return posn

Function body:

int CstrLastI (const char* cpHaystack, const char* cpNeedle)
{
   int32_t n ;
   int32_t posn = -1;
   char    lower ;
   char    upper ;
   if (!cpHaystack || !cpHaystack[0]|| !cpNeedle || !cpNeedle[0])
       return -1;
   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))
           posn = n ;
   }
   return posn ;
}