jingdian1956
// 替换路径中所有“\”为“/”
#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;
}

 

分类:

技术点:

相关文章: