#include <utils_win.h>
Definition at line 53 of file utils_win.h.
◆ WideToUtf8Scope()
dart::bin::WideToUtf8Scope::WideToUtf8Scope |
( |
const wchar_t * |
wide | ) |
|
|
inlineexplicit |
Definition at line 55 of file utils_win.h.
57 intptr_t utf8_len =
58 WideCharToMultiByte(CP_UTF8, 0, wide, -1, nullptr, 0, nullptr, nullptr);
59 char*
utf8 =
reinterpret_cast<char*
>(
malloc(utf8_len));
60 WideCharToMultiByte(CP_UTF8, 0, wide, -1,
utf8, utf8_len,
nullptr,
nullptr);
61 length_ = utf8_len;
63 }
CAllocUniquePtr< char > CStringUniquePtr
void * malloc(size_t size)
◆ length()
intptr_t dart::bin::WideToUtf8Scope::length |
( |
| ) |
const |
|
inline |
◆ release()
Definition at line 69 of file utils_win.h.
69{ return std::move(utf8_); }
◆ utf8()
char * dart::bin::WideToUtf8Scope::utf8 |
( |
| ) |
const |
|
inline |
Definition at line 65 of file utils_win.h.
65{ return utf8_.get(); }
The documentation for this class was generated from the following file: