14namespace hi::inline v1 {
16[[nodiscard]]
constexpr std::u32string to_u32string(std::u32string_view rhs)
noexcept
18 return char_converter<
"utf-32",
"utf-32">{}(rhs);
21[[nodiscard]]
constexpr std::u32string to_u32string(std::u16string_view rhs)
noexcept
23 return char_converter<
"utf-16",
"utf-32">{}(rhs);
26[[nodiscard]]
constexpr std::u32string to_u32string(std::u8string_view rhs)
noexcept
28 return char_converter<
"utf-8",
"utf-32">{}(rhs);
31[[nodiscard]]
constexpr std::u32string to_u32string(std::wstring_view rhs)
noexcept
33#if WCHAR_MAX >= 0x10'ffff
34 return char_converter<
"utf-32",
"utf-32">{}(rhs);
36 return char_converter<
"utf-16",
"utf-32">{}(rhs);
40[[nodiscard]]
constexpr std::u32string to_u32string(std::string_view rhs)
noexcept
42 return char_converter<
"utf-8",
"utf-32">{}(rhs);
45[[nodiscard]]
constexpr std::u16string to_u16string(std::u32string_view rhs)
noexcept
47 return char_converter<
"utf-32",
"utf-16">{}(rhs);
50[[nodiscard]]
constexpr std::u16string to_u16string(std::u16string_view rhs)
noexcept
52 return char_converter<
"utf-16",
"utf-16">{}(rhs);
55[[nodiscard]]
constexpr std::u16string to_u16string(std::u8string_view rhs)
noexcept
57 return char_converter<
"utf-8",
"utf-16">{}(rhs);
60[[nodiscard]]
constexpr std::u16string to_u16string(std::wstring_view rhs)
noexcept
62#if WCHAR_MAX >= 0x10'ffff
63 return char_converter<
"utf-32",
"utf-16">{}(rhs);
65 return char_converter<
"utf-16",
"utf-16">{}(rhs);
69[[nodiscard]]
constexpr std::u16string to_u16string(std::string_view rhs)
noexcept
71 return char_converter<
"utf-8",
"utf-16">{}(rhs);
74[[nodiscard]]
constexpr std::u8string to_u8string(std::u32string_view rhs)
noexcept
76 return char_converter<
"utf-32",
"utf-8">{}.convert<std::u8string>(rhs);
79[[nodiscard]]
constexpr std::u8string to_u8string(std::u16string_view rhs)
noexcept
81 return char_converter<
"utf-16",
"utf-8">{}.convert<std::u8string>(rhs);
84[[nodiscard]]
constexpr std::u8string to_u8string(std::u8string_view rhs)
noexcept
86 return char_converter<
"utf-8",
"utf-8">{}.convert<std::u8string>(rhs);
89[[nodiscard]]
constexpr std::u8string to_u8string(std::wstring_view rhs)
noexcept
91#if WCHAR_MAX >= 0x10'ffff
92 return char_converter<
"utf-32",
"utf-8">{}.convert<std::u8string>(rhs);
94 return char_converter<
"utf-16",
"utf-8">{}.convert<std::u8string>(rhs);
98[[nodiscard]]
constexpr std::u8string to_u8string(std::string_view rhs)
noexcept
100 return char_converter<
"utf-8",
"utf-8">{}.convert<std::u8string>(rhs);
105#if WCHAR_MAX >= 0x10'ffff
106 return char_converter<
"utf-32",
"utf-32">{}.convert<
std::wstring>(rhs);
108 return char_converter<
"utf-32",
"utf-16">{}.convert<
std::wstring>(rhs);
114#if WCHAR_MAX >= 0x10'ffff
115 return char_converter<
"utf-16",
"utf-32">{}.convert<
std::wstring>(rhs);
117 return char_converter<
"utf-16",
"utf-16">{}.convert<
std::wstring>(rhs);
123#if WCHAR_MAX >= 0x10'ffff
124 return char_converter<
"utf-8",
"utf-32">{}.convert<
std::wstring>(rhs);
126 return char_converter<
"utf-8",
"utf-16">{}.convert<
std::wstring>(rhs);
132#if WCHAR_MAX >= 0x10'ffff
133 return char_converter<
"utf-32",
"utf-32">{}.convert<
std::wstring>(rhs);
135 return char_converter<
"utf-16",
"utf-16">{}.convert<
std::wstring>(rhs);
141#if WCHAR_MAX >= 0x10'ffff
142 return char_converter<
"utf-8",
"utf-32">{}.convert<
std::wstring>(rhs);
144 return char_converter<
"utf-8",
"utf-16">{}.convert<
std::wstring>(rhs);
150 return char_converter<
"utf-32",
"utf-8">{}(rhs);
155 return char_converter<
"utf-16",
"utf-8">{}(rhs);
160 return char_converter<
"utf-8",
"utf-8">{}(rhs);
165#if WCHAR_MAX >= 0x10'ffff
166 return char_converter<
"utf-32",
"utf-8">{}(rhs);
168 return char_converter<
"utf-16",
"utf-8">{}(rhs);
174 return char_converter<
"utf-8",
"utf-8">{}(rhs);