text-2.0: An efficient packed Unicode text type.
Copyright(c) 2008 2009 Tom Harper
(c) 2009 2010 Bryan O'Sullivan
(c) 2009 Duncan Coutts
(c) 2021 Andrew Lelechenko
LicenseBSD-style
Maintainerbos@serpentine.com
Stabilityexperimental
PortabilityGHC
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Text.Internal.Encoding.Utf8

Description

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.

Synopsis

Documentation

utf8Length :: Char -> Int Source #

Since: text-2.0

utf8LengthByLeader :: Word8 -> Int Source #

Since: text-2.0

Validation

Naive decoding

data DecoderResult Source #

Since: text-2.0

newtype DecoderState Source #

Constructors

DecoderState Word8 

Instances

Instances details
Eq DecoderState Source # 
Instance details

Defined in Data.Text.Internal.Encoding.Utf8

newtype CodePoint Source #

Constructors

CodePoint Int