Strings » transcode() module

Transcodes a UTF string into another UTF encoding.

Functions

template <typename Char>
auto transcode(std::string_view str) noexcept -> std::conditional_t< std::is_same_v< Char, char >, std::string_view, std::basic_string< Char >> -> auto
Transcodes a UTF-8 string into another UTF encoding.
template <typename Char>
auto transcode(std::wstring_view str) noexcept -> std::conditional_t< std::is_same_v< Char, wchar_t >, std::wstring_view, std::basic_string< Char >> -> auto
Transcodes a UTF wide string into another UTF encoding.
template <typename Char>
auto transcode(std::u16string_view str) noexcept -> std::conditional_t< std::is_same_v< Char, char16_t >, std::u16string_view, std::basic_string< Char >> -> auto
Transcodes a UTF-16 string into another UTF encoding.
template <typename Char>
auto transcode(std::u32string_view str) noexcept -> std::conditional_t< std::is_same_v< Char, char32_t >, std::u32string_view, std::basic_string< Char >> -> auto
Transcodes a UTF-32 string into another UTF encoding.
template <typename Char>
auto transcode(std::u8string_view str) noexcept -> std::conditional_t< std::is_same_v< Char, char8_t >, std::u8string_view, std::basic_string< Char >> -> auto
Transcodes a UTF-8 string into another UTF encoding.

Function documentation

template <typename Char>
auto transcode(std::string_view str) noexcept -> std::conditional_t< std::is_same_v< Char, char >, std::string_view, std::basic_string< Char >>

Transcodes a UTF-8 string into another UTF encoding.

template <typename Char>
auto transcode(std::wstring_view str) noexcept -> std::conditional_t< std::is_same_v< Char, wchar_t >, std::wstring_view, std::basic_string< Char >>

Transcodes a UTF wide string into another UTF encoding.

template <typename Char>
auto transcode(std::u16string_view str) noexcept -> std::conditional_t< std::is_same_v< Char, char16_t >, std::u16string_view, std::basic_string< Char >>

Transcodes a UTF-16 string into another UTF encoding.

template <typename Char>
auto transcode(std::u32string_view str) noexcept -> std::conditional_t< std::is_same_v< Char, char32_t >, std::u32string_view, std::basic_string< Char >>

Transcodes a UTF-32 string into another UTF encoding.

template <typename Char>
auto transcode(std::u8string_view str) noexcept -> std::conditional_t< std::is_same_v< Char, char8_t >, std::u8string_view, std::basic_string< Char >>

Transcodes a UTF-8 string into another UTF encoding.