utf8Length :: Char -> Int
Measure byte length of UTF-8 encoding for a given character.
License : BSD-style Maintainer : bos@serpentine.com Stability : experimental Portability : GHC
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.
utf8Length :: Char -> IntMeasure byte length of UTF-8 encoding for a given character.
utf8LengthByLeader :: Word8 -> IntMeasure byte length of UTF-8 encoding for characters, starting with a given byte.
ord2 :: Char -> (Word8, Word8)Encode a character as UTF-8 bytes assuming that exactly 2 are needed. This precondition is not checked.
ord3 :: Char -> (Word8, Word8, Word8)Encode a character as UTF-8 bytes assuming that exactly 3 are needed. This precondition is not checked.
ord4 :: Char -> (Word8, Word8, Word8, Word8)Encode a character as UTF-8 bytes assuming that exactly 4 are needed. This precondition is not checked.
chr2 :: Word8 -> Word8 -> Charchr3 :: Word8 -> Word8 -> Word8 -> Charchr4 :: Word8 -> Word8 -> Word8 -> Word8 -> Charvalidate1 :: Word8 -> Boolvalidate2 :: Word8 -> Word8 -> Boolvalidate3 :: Word8 -> Word8 -> Word8 -> Boolvalidate4 :: Word8 -> Word8 -> Word8 -> Word8 -> Boolnewtype DecoderStateDecoderState :: Word8 -> DecoderStateutf8AcceptState :: DecoderStateutf8RejectState :: DecoderStateupdateDecoderState :: Word8 -> DecoderState -> DecoderStatedata DecoderResultAccept :: Char -> DecoderResultIncomplete :: DecoderState -> CodePoint -> DecoderResultReject :: DecoderResultnewtype CodePointCodePoint :: Int -> CodePointutf8DecodeStart :: Word8 -> DecoderResultutf8DecodeContinue :: Word8 -> DecoderState -> CodePoint -> DecoderResultinstance Eq DecoderStateinstance Show DecoderStateCommunity contribution. The service has not verified this documentation. The generator reported 2 diagnostics.
Target: Linux on x86-64. Some inferred types and resolved links are not available.
Generator: aihc-haddock-858b1951-web-1
Metadata snapshot: 0b0724abd14577f7a6c8172d62e3e1c0808feb114d4d379402e17f37e3c7801e
Open the dependency plan · Download the documentation model