5#if !defined(__XTD_CORE_INTERNAL__)
6#error "Do not include this file: Internal use only"
14template<
typename char_t,
typename value_t>
15inline std::basic_string<char_t> __character_formatter(
const std::basic_string<char_t>& fmt, value_t value,
const std::locale& loc) {
16 std::basic_string<char_t> result;
19 result.push_back(
static_cast<char>(codepoint));
20 else if (codepoint < 0x800) {
21 result.push_back(
static_cast<char>((codepoint >> 6) | 0xc0));
22 result.push_back(
static_cast<char>((codepoint & 0x3f) | 0x80));
23 }
else if (codepoint < 0x10000) {
24 result.push_back(
static_cast<char>((codepoint >> 12) | 0xe0));
25 result.push_back(
static_cast<char>(((codepoint >> 6) & 0x3f) | 0x80));
26 result.push_back(
static_cast<char>((codepoint & 0x3f) | 0x80));
28 result.push_back(
static_cast<char>((codepoint >> 18) | 0xf0));
29 result.push_back(
static_cast<char>(((codepoint >> 12) & 0x3f) | 0x80));
30 result.push_back(
static_cast<char>(((codepoint >> 6) & 0x3f) | 0x80));
31 result.push_back(
static_cast<char>((codepoint & 0x3f) | 0x80));
char32_t char32
Represents a 32-bit unicode character.
Definition char32.h:26