Data.Bytes.Parser.Utf8

bytesmith-0.3.11.1: Nonresumable byte parser

Safe Haskell | None
Language | Haskell2010

Data.Bytes.Parser.Utf8

Contents

- Get Character

Description

Parse input as UTF-8-encoded text. Parsers in this module will fail if they encounter a byte above `0x7F`.

Synopsis

- any# :: e -> Parser e s Char#
- shortText :: e -> ShortText -> Parser e s ()

# Get Character

any# :: e -> Parser e s Char# #

Interpret the next one to four bytes as a UTF-8-encoded character. Fails if the decoded codepoint is in the range U+D800 through U+DFFF.

shortText :: e -> ShortText -> Parser e s () #

Consume input that matches the argument. Fails if the input does not match.