|
CommonLib
|
Enumerations | |
| enum | encoding_type { unknown = 0 << 0 , utf8 = 1 << 0 , utf16_le = 1 << 1 , utf16_be = 1 << 2 , utf32_le = 1 << 3 , utf32_be = 1 << 4 , latin1 = 1 << 5 } |
Functions | |
| template<expr::basic_string T_result, expr::any_string T_str> | |
| T_result | convert (const T_str &in_str, encoding_type in_dst_encoding=expr::get_char_encoding_type< T_result >(), encoding_type in_src_encoding=expr::get_char_encoding_type< T_str >()) |
| template<encoding_type dst_encoding, expr::any_string T_str, expr::any_string T_result = expr::encoded_string_t<dst_encoding>> | |
| T_result | convert (const T_str &in_str) |
| std::vector< uint8_t > | get_bom (encoding_type in_encoding) |
| constexpr size_t | get_bom_length (encoding_type in_encoding) |
| template<encoding_type encoding> | |
| constexpr size_t | get_bom_length () |
| template<expr::any_string... T_args, typename T_result = expr::pi_string_t<T_args...>> | |
| std::array< T_result, sizeof...(T_args)> | precedent_convert (const T_args &... in_args) |
| template<expr::basic_string T_result, expr::any_string T_str> | |
| bool | try_convert (const T_str &in_str, T_result &out_result, encoding_type in_dst_encoding=expr::get_char_encoding_type< T_result >(), encoding_type in_src_encoding=expr::get_char_encoding_type< T_str >()) |
| template<encoding_type dst_encoding, expr::any_string T_str, expr::any_string T_result = expr::encoded_string_t<dst_encoding>> | |
| bool | try_convert (const T_str &in_str, T_result &out_result) |
|
inline |
Converts a string to a different encoding format.
| dst_encoding | The encoding to convert to. |
| T_str | The string type to convert from. |
| T_result | The string type to convert to, inferred from the encoding type. |
| in_str | The string to convert. |
|
inline |
Converts a string to a different encoding format.
| T_result | The string type to convert to. |
| T_str | The string type to convert from. |
| in_str | The string to convert. |
| in_src_encoding | The encoding to convert from, inferred from the input string type. |
| in_dst_encoding | The encoding to convert to, inferred from the return type. |
|
inline |
Gets the byte order mark of an encoding type.
| in_encoding | The encoding type. |
|
inlineconstexpr |
Gets the length of the byte order mark of an encoding type.
| encoding | The encoding type. |
|
inlineconstexpr |
Gets the length of the byte order mark of an encoding type.
| in_encoding | The encoding type. |
|
inline |
Converts multiple strings to share the same encoding format.
| T_args | The string types. |
| T_result | The string type to convert to inferred from the string with the largest character size. |
| in_args | The strings to convert. |
|
inline |
Tries to convert a string to a different encoding format.
| dst_encoding | The encoding to convert to. |
| T_str | The string type to convert from. |
| T_result | The string type to convert to, inferred from the encoding type. |
| in_str | The string to convert. |
| out_result | The output string to set. |
|
inline |
Tries to convert a string to a different encoding format.
| T_result | The string type to convert to. |
| T_str | The string type to convert from. |
| in_str | The string to convert. |
| out_result | The output string to set. |
| in_src_encoding | The encoding to convert from, inferred from the input string type. |
| in_dst_encoding | The encoding to convert to, inferred from the return type. |