Lines Matching defs:wcs
48 bool WindowsStringUtils::safe_mbstowcs(const string &mbs, wstring *wcs) {
49 assert(wcs);
86 *wcs = &wcs_v[0];
91 bool WindowsStringUtils::safe_wcstombs(const wstring &wcs, string *mbs) {
99 if ((err = wcstombs_s(&mbs_length, NULL, 0, wcs.c_str(), _TRUNCATE)) != 0) {
104 if ((mbs_length = wcstombs(NULL, wcs.c_str(), wcs.length())) == (size_t)-1) {
116 if ((err = wcstombs_s(NULL, &mbs_v[0], mbs_length, wcs.c_str(),
121 if (wcstombs(&mbs_v[0], wcs.c_str(), wcs.length()) == (size_t)-1) {