Replaces real values with thier escape sequences where approapriate. Eg "Hello" on one line followed by "World" on another will become "Hello\nWorld".

Return TypeFunction nameArguments
hzStringEnEscape(hzString&,)

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

Function Logic:

0:START 1:unknown 2:Return result 3:unknown 4:unknown 5:items items 6:unknown 7:items items 8:unknown 9:items items 10:unknown 11:items items 12:items 13:result 14:Return result

Function body:

hzString EnEscape (hzString& x)
{
   //  Category: Text Processing
   //  
   //  Replaces real values with thier escape sequences where approapriate. Eg "Hello" on one line followed by
   //  "World" on another will become "Hello\nWorld".
   //  
   //  Arguments: 1) x Input string
   //  
   //  Returns: Instance of hzString by value being the escaped translation of the supplied string
   _hzfunc(__func__) ;
   hzChain     ult ;       //  Working chain
   const char* i ;         //  Input string iterator
   hzString    result ;    //  Output string
   if (!x.Length())
       return result ;
   for (i = *x ; *i ; i++)
   {
       if (*i == CHAR_CR)  { ult.AddByte(CHAR_BKSLASH) ; ult.AddByte(''r'');continue ; }
       if (*i == CHAR_NL)  { ult.AddByte(CHAR_BKSLASH) ; ult.AddByte(''n'');continue ; }
       if (*i == CHAR_TAB) { ult.AddByte(CHAR_BKSLASH) ; ult.AddByte(''t'');continue ; }
       if (*i < 27)
       {
           ult.AddByte(CHAR_HAT) ;
           ult.AddByte((*i + ''A'')-1);
           continue ;
       }
       ult.AddByte(*i) ;
   }
   result = ult ;
   return result ;
}