| Return Type | Function name | Arguments |
|---|---|---|
| unsigned int | CstrCopy | (char*,const char*,unsigned int,) |
Declared in file: hzTextproc.h
Defined in file : hzTextproc.cpp
Function Logic:
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 ;
}