Overwite the character string (arg 1) with that provided (arg 2) and optionally limit the number of bytes (arg 3)

Return TypeFunction nameArguments
uint32_tCstrOverwrite(char*,const char*,uint32_t,)

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

Function Logic:

0:START 1:unknown 2:Return 0 3:unknown 4:Return 0 5:unknown 6:Return 0 7:unknown 8:unknown 9:unknown 10:Return nCount

Function body:

uint32_t CstrOverwrite (char* cpDest)const char* cpSource, uint32_t nMaxlen, 
{
   //  Category: Text Processing
   //  
   //  Overwite the character string (arg 1) with that provided (arg 2) and optionally limit the number of bytes (arg 3)
   //  
   //  Arguments: 1) cpDest  Destination string
   //     2) cpSource Source string
   //     3) nMaxlen  Max length to copy or 0 for no whole string copy
   //  
   //  Returns: 0 If either the desination or the source are not supplied
   //     0+ The number of characters overwritten
   _hzfunc("CstrOverwrite_a") ;
   uint32_t    nCount = 0; //  Byte counter
   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++) ;
   return nCount ;
}