Warning
This page refers to an old version of SFML. Click here to switch to the latest version.
Warning
This page refers to an old version of SFML. Click here to switch to the latest version.
Specialization of the Utf template for UTF-32. More...
#include <SFML/System/Utf.hpp>
Static Public Member Functions | |
| template<typename In> | |
| static In | decode (In begin, In end, char32_t &output, char32_t replacement=0) |
| Decode a single UTF-32 character. | |
| template<typename Out> | |
| static Out | encode (char32_t input, Out output, char32_t replacement=0) |
| Encode a single UTF-32 character. | |
| template<typename In> | |
| static In | next (In begin, In end) |
| Advance to the next UTF-32 character. | |
| template<typename In> | |
| static std::size_t | count (In begin, In end) |
| Count the number of characters of a UTF-32 sequence. | |
| template<typename In, typename Out> | |
| static Out | fromAnsi (In begin, In end, Out output, const std::locale &locale={}) |
| Convert an ANSI characters range to UTF-32. | |
| template<typename In, typename Out> | |
| static Out | fromWide (In begin, In end, Out output) |
| Convert a wide characters range to UTF-32. | |
| template<typename In, typename Out> | |
| static Out | fromLatin1 (In begin, In end, Out output) |
| Convert a latin-1 (ISO-5589-1) characters range to UTF-32. | |
| template<typename In, typename Out> | |
| static Out | toAnsi (In begin, In end, Out output, char replacement=0, const std::locale &locale={}) |
| Convert an UTF-32 characters range to ANSI characters. | |
| template<typename In, typename Out> | |
| static Out | toWide (In begin, In end, Out output, wchar_t replacement=0) |
| Convert an UTF-32 characters range to wide characters. | |
| template<typename In, typename Out> | |
| static Out | toLatin1 (In begin, In end, Out output, char replacement=0) |
| Convert an UTF-16 characters range to latin-1 (ISO-5589-1) characters. | |
| template<typename In, typename Out> | |
| static Out | toUtf8 (In begin, In end, Out output) |
| Convert a UTF-32 characters range to UTF-8. | |
| template<typename In, typename Out> | |
| static Out | toUtf16 (In begin, In end, Out output) |
| Convert a UTF-32 characters range to UTF-16. | |
| template<typename In, typename Out> | |
| static Out | toUtf32 (In begin, In end, Out output) |
| Convert a UTF-32 characters range to UTF-32. | |
| template<typename In> | |
| static char32_t | decodeAnsi (In input, const std::locale &locale={}) |
| Decode a single ANSI character to UTF-32. | |
| template<typename In> | |
| static char32_t | decodeWide (In input) |
| Decode a single wide character to UTF-32. | |
| template<typename Out> | |
| static Out | encodeAnsi (char32_t codepoint, Out output, char replacement=0, const std::locale &locale={}) |
| Encode a single UTF-32 character to ANSI. | |
| template<typename Out> | |
| static Out | encodeWide (char32_t codepoint, Out output, wchar_t replacement=0) |
| Encode a single UTF-32 character to wide. | |
|
static |
Count the number of characters of a UTF-32 sequence.
This function is trivial for UTF-32, which can store every character in a single storage element.
| begin | Iterator pointing to the beginning of the input sequence |
| end | Iterator pointing to the end of the input sequence |
|
static |
Decode a single UTF-32 character.
Decoding a character means finding its unique 32-bits code (called the codepoint) in the Unicode standard. For UTF-32, the character value is the same as the codepoint.
| begin | Iterator pointing to the beginning of the input sequence |
| end | Iterator pointing to the end of the input sequence |
| output | Codepoint of the decoded UTF-32 character |
| replacement | Replacement character to use in case the UTF-8 sequence is invalid |
|
static |
Decode a single ANSI character to UTF-32.
This function does not exist in other specializations of sf::Utf<>, it is defined for convenience (it is used by several other conversion functions).
| input | Input ANSI character |
| locale | Locale to use for conversion |
|
static |
Decode a single wide character to UTF-32.
This function does not exist in other specializations of sf::Utf<>, it is defined for convenience (it is used by several other conversion functions).
| input | Input wide character |
|
static |
Encode a single UTF-32 character.
Encoding a character means converting a unique 32-bits code (called the codepoint) in the target encoding, UTF-32. For UTF-32, the codepoint is the same as the character value.
| input | Codepoint to encode as UTF-32 |
| output | Iterator pointing to the beginning of the output sequence |
| replacement | Replacement for characters not convertible to UTF-32 (use 0 to skip them) |
|
static |
Encode a single UTF-32 character to ANSI.
This function does not exist in other specializations of sf::Utf<>, it is defined for convenience (it is used by several other conversion functions).
| codepoint | Iterator pointing to the beginning of the input sequence |
| output | Iterator pointing to the beginning of the output sequence |
| replacement | Replacement if the input character is not convertible to ANSI (use 0 to skip it) |
| locale | Locale to use for conversion |
|
static |
Encode a single UTF-32 character to wide.
This function does not exist in other specializations of sf::Utf<>, it is defined for convenience (it is used by several other conversion functions).
| codepoint | Iterator pointing to the beginning of the input sequence |
| output | Iterator pointing to the beginning of the output sequence |
| replacement | Replacement if the input character is not convertible to wide (use 0 to skip it) |
|
static |
Convert an ANSI characters range to UTF-32.
The current global locale will be used by default, unless you pass a custom one in the locale parameter.
| begin | Iterator pointing to the beginning of the input sequence |
| end | Iterator pointing to the end of the input sequence |
| output | Iterator pointing to the beginning of the output sequence |
| locale | Locale to use for conversion |
|
static |
Convert a latin-1 (ISO-5589-1) characters range to UTF-32.
| begin | Iterator pointing to the beginning of the input sequence |
| end | Iterator pointing to the end of the input sequence |
| output | Iterator pointing to the beginning of the output sequence |
|
static |
Convert a wide characters range to UTF-32.
| begin | Iterator pointing to the beginning of the input sequence |
| end | Iterator pointing to the end of the input sequence |
| output | Iterator pointing to the beginning of the output sequence |
|
static |
Advance to the next UTF-32 character.
This function is trivial for UTF-32, which can store every character in a single storage element.
| begin | Iterator pointing to the beginning of the input sequence |
| end | Iterator pointing to the end of the input sequence |
|
static |
Convert an UTF-32 characters range to ANSI characters.
The current global locale will be used by default, unless you pass a custom one in the locale parameter.
| begin | Iterator pointing to the beginning of the input sequence |
| end | Iterator pointing to the end of the input sequence |
| output | Iterator pointing to the beginning of the output sequence |
| replacement | Replacement for characters not convertible to ANSI (use 0 to skip them) |
| locale | Locale to use for conversion |
|
static |
Convert an UTF-16 characters range to latin-1 (ISO-5589-1) characters.
| begin | Iterator pointing to the beginning of the input sequence |
| end | Iterator pointing to the end of the input sequence |
| output | Iterator pointing to the beginning of the output sequence |
| replacement | Replacement for characters not convertible to wide (use 0 to skip them) |
|
static |
Convert a UTF-32 characters range to UTF-16.
| begin | Iterator pointing to the beginning of the input sequence |
| end | Iterator pointing to the end of the input sequence |
| output | Iterator pointing to the beginning of the output sequence |
|
static |
Convert a UTF-32 characters range to UTF-32.
This functions does nothing more than a direct copy; it is defined only to provide the same interface as other specializations of the sf::Utf<> template, and allow generic code to be written on top of it.
| begin | Iterator pointing to the beginning of the input sequence |
| end | Iterator pointing to the end of the input sequence |
| output | Iterator pointing to the beginning of the output sequence |
|
static |
Convert a UTF-32 characters range to UTF-8.
| begin | Iterator pointing to the beginning of the input sequence |
| end | Iterator pointing to the end of the input sequence |
| output | Iterator pointing to the beginning of the output sequence |
|
static |
Convert an UTF-32 characters range to wide characters.
| begin | Iterator pointing to the beginning of the input sequence |
| end | Iterator pointing to the end of the input sequence |
| output | Iterator pointing to the beginning of the output sequence |
| replacement | Replacement for characters not convertible to wide (use 0 to skip them) |