]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkUtilities.h
BUG slash
[bbtk.git] / kernel / src / bbtkUtilities.h
index bfad45561227dad6df11949bc2577822be9ce438..2b1b031559faf77899ab4c1d41a2bca122a815f2 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkUtilities.h,v $
   Language:  C++
-  Date:      $Date: 2008/02/18 10:41:02 $
-  Version:   $Revision: 1.12 $
+  Date:      $Date: 2008/03/10 06:24:13 $
+  Version:   $Revision: 1.13 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See doc/license.txt or
@@ -517,15 +517,14 @@ static int Explore(std::string const &dirpath, bool recursive, std::vector<std::
   //========================================================================
 
     static inline void replace( std::string& str,
-                                const std::string& from
-                                const std::string& to )
+                                const std::string& what
+                                const std::string& with )
     {
-      using std::string;
-      string::size_type pos = str.find( from );
-      while ( pos != string::npos )
+      std::string::size_type pos = str.find( what );
+         while ( pos != std::string::npos )
       {
-        str.replace( pos, from.size(), to );
-        pos = str.find( from, pos+from.size()-1 );
+        str.replace( pos, what.size(), with );
+        pos = str.find( what, pos+what.size()-1 );
       } 
     }
     //========================================================================