-
- void replace( std::string& str,
- const std::string& from,
- const std::string& to )
- {
- using std::string;
- string::size_type pos = str.find( from );
- while ( pos != string::npos )
- {
- str.replace( pos, from.size(), to );
- pos = str.find( from, pos+from.size()-1 );
- }
- }
-
-
+//==========================================================================
+void replace(std::string& str,
+ const std::string& from,
+ const std::string& to )
+{
+ std::string::size_type pos = str.find( from );
+ while ( pos != std::string::npos )
+ {
+ str.replace( pos, from.size(), to );
+ pos = str.find( from, pos+from.size()-1 );
+ }
+}
+//==========================================================================