MCPcopy Create free account
hub / github.com/boostorg/filesystem / do_in

Method do_in

src/windows_file_codecvt.cpp:28–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26namespace detail {
27
28std::codecvt_base::result windows_file_codecvt::do_in(
29 std::mbstate_t&,
30 const char* from, const char* from_end, const char*& from_next,
31 wchar_t* to, wchar_t* to_end, wchar_t*& to_next) const
32{
33 UINT codepage = AreFileApisANSI() ? CP_ACP : CP_OEMCP;
34
35 int count;
36 if ((count = ::MultiByteToWideChar(codepage, MB_PRECOMPOSED, from, static_cast< int >(from_end - from), to, static_cast< int >(to_end - to))) == 0)
37 {
38 return error; // conversion failed
39 }
40
41 from_next = from_end;
42 to_next = to + count;
43 *to_next = L'\0';
44 return ok;
45}
46
47std::codecvt_base::result windows_file_codecvt::do_out(
48 std::mbstate_t&,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected