Return TypeFunction nameArguments
hzString&hzString::DelWhiteTrail(void)

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

Function Logic:

0:START 1:!m_addr 2:Return *this 3:_strXlate thisCtl _strItem::_data i hzString::Length nLen wc count 4:count>=0; 5:i[count]<=(char)32 6:items 7:!wc 8:Return *this 9:nusize 10:nusize<=0 11:hzString::Clear 12:Return *this 13:_strAlloc destAddr 14:!destAddr 15:hzexit 16:_strXlate destCtl _strItem::_setSize _strItem::_data _strItem::_data memcpy destCtl hzString::Clear m_addr 17:Return *this

Function body:

hzString& hzString::DelWhiteTrail (void)
{
   _hzfunc("hzString::DelWhiteTrail") ;
   _strItem*       thisCtl ;
   _strItem*       destCtl ;
   const char*     i ;
   uint32_t        destAddr ;
   uint32_t        wc ;
   uint32_t        nLen ;
   uint32_t        nusize ;
   int32_t         count ;
   if (!m_addr)
       return *this ;
   thisCtl = (_strItem*) _strXlate(m_addr) ;
   i = (char*) thisCtl->_data() ;
   nLen = Length() ;
   wc = 0;
   for (count = nLen - 1; count >&eq; 0; count--)
   {
       if (i[count] <&eq; CHAR_SPACE)
           wc++ ;
       else
           break ;
   }
   if (!wc)
       return *this ;
   nusize = nLen - wc ;
   if (nusize <&eq; 0)
   {
       Clear() ;
       return *this ;
   }
   destAddr = _strAlloc(nusize) ;
   if (!destAddr)
       hzexit(E_MEMORY, "Buffer of (%d) bytes", nusize) ;
   destCtl = (_strItem*) _strXlate(destAddr) ;
   destCtl->_setSize(nusize) ;
   memcpy(destCtl->_data(), thisCtl->_data(), nusize) ;
   destCtl->m_copy = 1;
   Clear() ;
   m_addr = destAddr ;
   return *this ;
}