Return TypeFunction nameArguments
unsigned intCstrCopy(char*,const char*,unsigned int,)

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

Function Logic:

0:START 1:!cpDest 2:Return 0 3:!cpSource 4:Return 0 5:!cpSource[0] 6:Return 0 7:nMaxlen 8:*cpSource&&nCount 9:*cpSource; 10:* 11:Return nCount

Function body:

unsigned int CstrCopy (char* cpDest, const char* cpSource, unsigned int nMaxlen)
{
   _hzfunc("CstrCopy_a") ;
   uint32_t    nCount = 0;
   if (!cpDest)        return 0;
   if (!cpSource)      return 0;
   if (!cpSource[0])   return 0;
   if (nMaxlen)
       for (; *cpSource && nCount < nMaxlen ; *cpDest++ = *cpSource++, nCount++) ;
   else
       for (; *cpSource ; *cpDest++ = *cpSource++, nCount++) ;
   *cpDest = 0;
   return nCount ;
}