UTF-32 iterators #
UTF32.decodeIter reads characters from UTF-32 code units, and UTF32.encodeIter writes them back.
A code unit that is a surrogate or above U+10FFFF is ill-formed.
The UTF-32 encoding form, as a decoder from code units and an encoder to code units.
Instances For
Decodes one character from the UTF-32 code units of it. Calls yield with the character and the
iterator after it, error with the iterator after a code unit that is not a scalar value, or
done at the end of the input.
Instances For
Decodes the UTF-32 code units of it, stopping at the first that is not a scalar value.
A for loop or fold over the result ends at ill-formed input just as at the end of the input. To
tell them apart, fold with decodeFold, which also returns the iterator where decoding stopped, and
check decodeError? there, find the first ill-formed input ahead with decodeFailure?, or decode
with decodeIterLossy instead.