]> Creatis software - bbtkGEditor.git/blobdiff - lib/EditorGraphicBBS/bbsKernelEditorGraphic/GBoxModel.cxx
no message
[bbtkGEditor.git] / lib / EditorGraphicBBS / bbsKernelEditorGraphic / GBoxModel.cxx
index 1c03431f0efd776eadf5e63ee36590aef1877d07..c7b2c0caa47cf23b1483173f07f1a6680c9ee728 100644 (file)
@@ -199,6 +199,32 @@ namespace bbtk
                }
        }
 
+       void GBoxModel::addColons(std::string &text)
+       {
+               std::string character("&&2P&&");                                
+               size_t pos;
+               pos = text.find(character);
+               while(pos != std::string::npos)
+               {
+               //We replace the character "&&2P&&" with ":" for all the string
+                       text.replace(pos, character.length(),":");
+                       pos = text.find(character, pos);
+               }
+       }
+
+       void GBoxModel::removeColons(std::string &text)
+       {
+               std::string character(":");                             
+               size_t pos;
+               pos = text.find(character);
+               while(pos != std::string::npos)
+               {
+                       //We replace the character ":" with "&&2P&&" for all the string
+                       text.replace(pos, character.length(),"&&2P&&");
+                       pos = text.find(character, pos);
+                       }
+       }
+
        //=========================================================================