Changeset 1146
- Timestamp:
- 2000-05-04T17:16:23+12:00 (24 years ago)
- Location:
- trunk/gsdl/lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/lib/gsdltools.cpp
r1076 r1146 28 28 /* 29 29 $Log$ 30 Revision 1.4 2000/05/04 05:16:23 sjboddie 31 Moved dm_safe from htmlutils to gsdltools. Also made it escape '\' 32 characters to prevent their mysterious disapearance from things like 33 windows filenames when they get passed through the macro expander. 34 30 35 Revision 1.3 2000/04/06 19:58:01 cs025 31 36 Correcting a correction - reinstated all lib files due to silly … … 49 54 } 50 55 56 text_t dm_safe (const text_t &instring) { 51 57 58 text_t outstring; 59 text_t::const_iterator here = instring.begin(); 60 text_t::const_iterator end = instring.end(); 61 while (here != end) { 62 if (*here == '_' || *here == '\\') outstring.push_back('\\'); 63 outstring.push_back(*here); 64 here ++; 65 } 66 return outstring; 67 } 68 -
trunk/gsdl/lib/gsdltools.h
r1076 r1146 38 38 bool littleEndian(); 39 39 40 // escapes '\' and '_' characters with '\' 41 // note that single '\' characters occurring 42 // naturally within text (or filenames!!) will 43 // be removed by the dm macro language 44 text_t dm_safe (const text_t &instring); 45 40 46 #endif
Note:
See TracChangeset
for help on using the changeset viewer.