摘要:
std::string src("三毛三毛三毛三毛三三三三流浪记"); size_t size = mbstowcs(NULL,src.c_str(),0); std::wstring dst; dst.resize(size); setlocale(LC_CTYPE,"chs");//setlocale(LC_CTYPE,"UTF-8") on mac mbstowcs(&dst[0],src.c_str(),size); wstring::size_type pos = dst.find_first_of(L'\0 阅读全文