diff -r 3cf9e5dda8ad -r 3c7c70c864cb gfxconversion/mifconv/src/mifconv_util.cpp --- a/gfxconversion/mifconv/src/mifconv_util.cpp Fri May 14 15:34:49 2010 +0300 +++ b/gfxconversion/mifconv/src/mifconv_util.cpp Thu Jun 24 15:15:25 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 )