Measure byte length of UTF-8 encoding for a given character.
Moduletext-2.1.4Haskell2010
Data.Text.Internal.Encoding.Utf8
Warning: this is an internal module, and does not have a stable API or name. Functions in this module may not check or enforce preconditions expected by public modules. Use at your own risk!
Basic UTF-8 validation and character manipulation.
Contents
Synopsis
- value utf8Length
- value utf8LengthByLeader
- value ord2
- value ord3
- value ord4
- value chr2
- value chr3
- value chr4
- value validate1
- value validate2
- value validate3
- value validate4
- newtype DecoderState
- value utf8AcceptState
- value utf8RejectState
- value updateDecoderState
- data DecoderResult
- newtype CodePoint
- value utf8DecodeStart
- value utf8DecodeContinue
- Packagetext-2.1.4
- Exports20
- LanguageHaskell2010
- LicenceBSD-2-Clause
- SourceUtf8.hs
Measure byte length of UTF-8 encoding for characters, starting with a given byte.
Encode a character as UTF-8 bytes assuming that exactly 2 are needed. This precondition is not checked.
Encode a character as UTF-8 bytes assuming that exactly 3 are needed. This precondition is not checked.
Encode a character as UTF-8 bytes assuming that exactly 4 are needed. This precondition is not checked.
Validation
Naive decoding
Constructors
Instances2Eq, Show
Eq DecoderStateDefined in text-2.1.4 · Data.Text.Internal.Encoding.Utf8Show DecoderStateDefined in text-2.1.4 · Data.Text.Internal.Encoding.Utf8