diff -r d3300267661e -r e5e3f539dd55 gfxconversion/mifconv/src/mifconv_util.cpp --- a/gfxconversion/mifconv/src/mifconv_util.cpp Tue May 11 16:43:53 2010 +0300 +++ b/gfxconversion/mifconv/src/mifconv_util.cpp Thu Jul 15 19:16:20 2010 +0300 @@ -28,6 +28,7 @@ #endif #include // for _MAX_PATH #include +#include #ifndef _MAX_PATH #define _MAX_PATH (260) @@ -192,6 +193,26 @@ /** * */ +void MifConvUtil::ReplaceStr( MifConvString& str, + MifConvString replaceFrom, MifConvString replaceTo) +{ + if( str.length() >= replaceFrom.length() ) + { + MifConvString::size_type index = 0; + while( (index = str.find(replaceFrom, index)) != MifConvString::npos ) + { + MifConvString tmp_str = str.substr(0, index); + tmp_str = tmp_str + replaceTo; + str = tmp_str + str.substr(index+replaceFrom.length(), + str.length()-index+replaceFrom.length() + ); + } + } +} + +/** + * + */ void MifConvUtil::SplitPath( const MifConvString& sourcePath, MifConvString& drive, MifConvString& path) { if( sourcePath.length() > 0 )