X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FEditorGraphicBBS%2FbbsKernelEditorGraphic%2FGBoxModel.cxx;h=c7b2c0caa47cf23b1483173f07f1a6680c9ee728;hb=a1bf4dc5c3153e37ab104d505bf72cf210a0df28;hp=1c03431f0efd776eadf5e63ee36590aef1877d07;hpb=ff95a246dc5fb05cffa4e6f289da505337ba673d;p=bbtkGEditor.git diff --git a/lib/EditorGraphicBBS/bbsKernelEditorGraphic/GBoxModel.cxx b/lib/EditorGraphicBBS/bbsKernelEditorGraphic/GBoxModel.cxx index 1c03431..c7b2c0c 100644 --- a/lib/EditorGraphicBBS/bbsKernelEditorGraphic/GBoxModel.cxx +++ b/lib/EditorGraphicBBS/bbsKernelEditorGraphic/GBoxModel.cxx @@ -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); + } + } + //=========================================================================