attoparsec-0.14.4: Fast combinator parsing for bytestrings and text
CopyrightBryan O'Sullivan 2007-2015
LicenseBSD3
Maintainerbos@serpentine.com
Stabilityexperimental
PortabilityGHC
Safe HaskellNone
LanguageHaskell2010

Data.Attoparsec.Text.Buffer

Description

An immutable buffer that supports cheap appends.

Synopsis

Documentation

data Buffer Source #

Instances

Instances details
Show Buffer Source # 
Instance details

Defined in Data.Attoparsec.Text.Buffer

Semigroup Buffer Source # 
Instance details

Defined in Data.Attoparsec.Text.Buffer

Monoid Buffer Source # 
Instance details

Defined in Data.Attoparsec.Text.Buffer

buffer :: Text -> Buffer Source #

The initial Buffer has no mutable zone, so we can avoid all copies in the (hopefully) common case of no further input being fed to us.

iter :: Buffer -> Int -> Iter Source #

O(1) Iterate (unsafely) one step forwards through a UTF-16 array, returning the current character and the delta to add to give the next offset to iterate at.

iter_ :: Buffer -> Int -> Int Source #

O(1) Iterate one step through a UTF-16 array, returning the delta to add to give the next offset to iterate at.