Basic unicode conversion.
More...
|
template<typename T, typename I, typename O> |
O | copy_utf (I f, I l, O o) |
template<typename T, typename R, typename O> |
O | copy_utf (const R &r, O o) |
◆ copy_utf() [1/2]
template<typename T, typename I, typename O>
O copy_utf |
( |
I | f, |
|
|
I | l, |
|
|
O | o ) |
copy_utf copies the text from the range [f, l) from UTF-8, 16, or 32 to UTF-8, 16 or 32 and assigns the result to *o.
- Template Parameters
-
T | must be 8, 16, or 32 bit integral type |
I | models InputIterator; value_type(I) must be 8, 16, or 32 bit integral type |
O | models OutputIterator; must accept T |
- Precondition
- [f, l) is a valid range of UTF-8, 16, or 32 encode text
-
o is not an iterator within the range [f, l)
-
There is enough space to hold the text being copied. The maximum requirement on the output is that [o, o + m(l - f)) is a valid range where m is
expand_utf<value_type(I), T>::value
- Note
- If the source contains an invalid or partial encoding then the output is undefined (debug builds may assert). However, the code will not read beyond the specified source range or output more than the maximum number of elements.
- Returns
- An output iterator pointing to the end of the encoded text.
Definition at line 549 of file unicode.hpp.
◆ copy_utf() [2/2]
template<typename T, typename R, typename O>
O copy_utf |
( |
const R & | r, |
|
|
O | o ) |