return ascii char version of wchar string Use AC() macro defined in ut_strop.h
| 397 | // return ascii char version of wchar string |
| 398 | // Use AC() macro defined in ut_strop.h |
| 399 | LPSTR CUT_Str::_AC(LPSTR dest, LPCTSTR wstr) { |
| 400 | // the AC macro should have checked for NULL wstr. |
| 401 | // the AC macro should have allocated strlen(dest)+1 based on len of wstr. |
| 402 | dest[0] = '\0'; |
| 403 | size_t chars; |
| 404 | size_t len = _tcslen(wstr)+1; |
| 405 | CUT_Str::wcstombs(&chars, dest, len, wstr, len); |
| 406 | // assert(chars); // not to worry - AC called with zero length string in most cases - this may catch some redundancies. |
| 407 | return dest; |
| 408 | } |
| 409 | #endif |
| 410 | |
| 411 | void CUT_Str::wcscpy(wchar_t * dest, size_t size, const wchar_t * source) |
nothing calls this directly
no outgoing calls
no test coverage detected