| 928 | } |
| 929 | |
| 930 | void StringReplace(string& strBase, string strSrc, string strDes) { |
| 931 | string::size_type pos = 0; |
| 932 | string::size_type srcLen = strSrc.size(); |
| 933 | string::size_type desLen = strDes.size(); |
| 934 | pos = strBase.find(strSrc, pos); |
| 935 | while ((pos != string::npos)) { |
| 936 | strBase.replace(pos, srcLen, strDes); |
| 937 | pos = strBase.find(strSrc, (pos + desLen)); |
| 938 | } |
| 939 | } |
| 940 | |
| 941 | #ifdef WIN32 |
| 942 | boost::filesystem::path GetSpecialFolderPath(int nFolder, bool fCreate) { |