// 替换路径中所有“\”为“/”
#include <algorithm>
static std::
string ConvertSlash(std::
string&
strUrl)
{
//size_t nLen = strlen(strPicTruePathBuff);
//for (size_t i = 0 ; i < nLen; i++)
//{
// if (strPicTruePathBuff[i] == '\\')
// strPicTruePathBuff[i] = '/';
//}
std::replace(strUrl.begin(), strUrl.end(), '\\',
'/');
return strUrl;
}
转载于:https://www.cnblogs.com/jingdian1956/p/3575801.html
转载请注明原文地址: https://win8.8miu.com/read-22295.html