Lightweight 0.20250904.0
|
Functions for converting between different (Unicode) encodings. More...
Functions | |
LIGHTWEIGHT_API std::u8string | Lightweight::ToUtf8 (std::u32string_view u32InputString) |
LIGHTWEIGHT_API std::u8string | Lightweight::ToUtf8 (std::u16string_view u16InputString) |
template<typename T > requires (std::same_as<T, wchar_t> && sizeof(wchar_t) == 2) | |
LIGHTWEIGHT_FORCE_INLINE std::u8string | Lightweight::ToUtf8 (std::basic_string_view< T > u16InputString) |
template<typename T > requires std::same_as<T, char32_t> || (std::same_as<T, wchar_t> && sizeof(wchar_t) == 4) | |
std::u16string | Lightweight::ToUtf16 (std::basic_string_view< T > const u32InputString) |
LIGHTWEIGHT_API std::u16string | Lightweight::ToUtf16 (std::u8string_view u8InputString) |
LIGHTWEIGHT_API std::u16string | Lightweight::ToUtf16 (std::string const &localeInputString) |
template<typename T = std::u32string> | |
T | Lightweight::ToUtf32 (std::u8string_view u8InputString) |
template<typename T = std::u32string> | |
T | Lightweight::ToUtf32 (std::u16string_view u16InputString) |
LIGHTWEIGHT_API std::wstring | Lightweight::ToStdWideString (std::u8string_view u8InputString) |
LIGHTWEIGHT_API std::wstring | Lightweight::ToStdWideString (std::string const &localeInputString) |
Functions for converting between different (Unicode) encodings.
LIGHTWEIGHT_API std::u8string Lightweight::ToUtf8 | ( | std::u32string_view | u32InputString | ) |
Converts from UTF-32 to UTF-8.
Referenced by Lightweight::ToUtf8().
LIGHTWEIGHT_API std::u8string Lightweight::ToUtf8 | ( | std::u16string_view | u16InputString | ) |
Converts from UTF-16 to UTF-8.
|
inline |
Converts from UTF-16 (as wchar_t) to UTF-8.
Definition at line 224 of file UnicodeConverter.hpp.
References Lightweight::ToUtf8().
std::u16string Lightweight::ToUtf16 | ( | std::basic_string_view< T > const | u32InputString | ) |
Converts from UTF-32 to UTF-16.
Definition at line 244 of file UnicodeConverter.hpp.
LIGHTWEIGHT_API std::u16string Lightweight::ToUtf16 | ( | std::u8string_view | u8InputString | ) |
Converts from UTF-8 to UTF-16.
LIGHTWEIGHT_API std::u16string Lightweight::ToUtf16 | ( | std::string const & | localeInputString | ) |
Converts from local 8-bit string to UTF-16.
T Lightweight::ToUtf32 | ( | std::u8string_view | u8InputString | ) |
Converts from UTF-8 to UTF-32.
Definition at line 268 of file UnicodeConverter.hpp.
T Lightweight::ToUtf32 | ( | std::u16string_view | u16InputString | ) |
Converts from UTF-16 to UTF-32.
Definition at line 280 of file UnicodeConverter.hpp.