UTF Traits class - functions to convert UTF sequences to and from Unicode code points.
More...
#include <boost/locale/utf.hpp>
template<typename CharType, int size = sizeof(CharType)>
struct boost::locale::utf::utf_traits< CharType, size >
UTF Traits class - functions to convert UTF sequences to and from Unicode code points.
template<typename CharType, int size = sizeof(CharType)>
The type of the character
template<typename CharType, int size = sizeof(CharType)>
template<typename Iterator >
Read one code point from the range [p,e) and return it.
- If the sequence that was read is incomplete sequence returns incomplete,
- If illegal sequence detected returns illegal
Requirements
- Iterator is valid input iterator
Postconditions
- p points to the last consumed character
template<typename CharType, int size = sizeof(CharType)>
template<typename Iterator >
Decodes valid UTF sequence that is pointed by p into code point.
If the sequence is invalid or points to end the behavior is undefined
template<typename CharType, int size = sizeof(CharType)>
template<typename Iterator >
Convert valid Unicode code point value to the UTF sequence.
Requirements:
- value is valid code point
- out is an output iterator should be able to accept at least width(value) units
Returns the iterator past the last written code unit.
template<typename CharType, int size = sizeof(CharType)>
Returns true if c is lead code unit, always true of UTF-32
template<typename CharType, int size = sizeof(CharType)>
Returns true if c is trail code unit, always false for UTF-32
template<typename CharType, int size = sizeof(CharType)>
Get the size of the trail part of variable length encoded sequence.
Returns -1 if C is not valid lead character
template<typename CharType, int size = sizeof(CharType)>
The width of specific code point in the code units.
Requirement: value is a valid Unicode code point Returns value in range [1..max_width]
template<typename CharType, int size = sizeof(CharType)>
Maximal width of valid sequence in the code units:
- UTF-8 - 4
- UTF-16 - 2
- UTF-32 - 1
The documentation for this struct was generated from the following file: