Changeset 919

Show
Ignore:
Timestamp:
14.02.2000 09:38:59 (20 years ago)
Author:
sjboddie
Message:

added dm_safe function

Location:
trunk/gsdl/src/recpt
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/recpt/htmlutils.cpp

    r533 r919  
    2828/* 
    2929   $Log$ 
     30   Revision 1.5  2000/02/13 20:38:59  sjboddie 
     31   added dm_safe function 
     32 
    3033   Revision 1.4  1999/09/07 04:56:56  sjboddie 
    3134   added GPL notice 
     
    6770} 
    6871 
     72text_t dm_safe (const text_t &instring) { 
    6973 
     74  text_t outstring; 
     75  text_t::const_iterator here = instring.begin(); 
     76  text_t::const_iterator end = instring.end(); 
     77  while (here != end) { 
     78    if (*here == '_') outstring += "\\_"; 
     79    else outstring.push_back(*here); 
     80    here ++; 
     81  } 
     82  return outstring; 
     83} 
  • trunk/gsdl/src/recpt/htmlutils.h

    r533 r919  
    3535text_t html_safe (const text_t &instring); 
    3636 
     37text_t dm_safe (const text_t &instring); 
     38 
    3739#endif