]> Creatis software - bbtk.git/blob - kernel/src/bbtkUtilities.cxx
Initial revision
[bbtk.git] / kernel / src / bbtkUtilities.cxx
1 #include "bbtkUtilities.h"
2  
3
4 namespace bbtk
5 {
6   /*
7   //========================================================================
8     /// Usefull functions for html generation
9     static void replace( std::string& str,
10                          const std::string& from, const std::string& to )
11     {
12       using std::string;
13       string::size_type pos = str.find( from );
14       while ( pos != string::npos )
15         {
16           //    std::cout << "'" << str << "' -> '";
17           str.replace( pos, from.size(), to );
18           pos = str.find( from, pos+from.size()-1 );
19           //    std::cout << str << "'"<< std::endl;
20         } 
21     }
22   //==========================================================================
23   inline void html_format(std::string& str)
24   {
25     replace( str, "&", "&amp;" );
26     replace( str, "<", "&lt;"# );
27     replace( str, ">", "&gt;" );
28   }
29   */
30 }