Basement.String.Builder

basement-0.0.16: Foundation scrap box of array & string

License | BSD-style
Maintainer | Foundation
Safe Haskell | None
Language | Haskell2010

Basement.String.Builder

Contents

- Emit functions
- unsafe

Description

String builder

Synopsis

- data Builder
- run :: PrimMonad prim => Builder -> prim (String, Maybe ValidationFailure, UArray Word8)
- runUnsafe :: PrimMonad prim => Builder -> prim String
- emit :: String -> Builder
- emitChar :: Char -> Builder
- unsafeStringBuilder :: Builder -> Builder

# Documentation

data Builder #

#### Instances

Instances details

Monoid Builder # |
Instance details Defined in Basement.String.Builder Methods mempty :: Builder # mappend :: Builder -> Builder -> Builder # mconcat :: [Builder] -> Builder #
Semigroup Builder # |
Instance details Defined in Basement.String.Builder Methods (<>) :: Builder -> Builder -> Builder # sconcat :: NonEmpty Builder -> Builder # stimes :: Integral b => b -> Builder -> Builder #

run :: PrimMonad prim => Builder -> prim (String, Maybe ValidationFailure, UArray Word8) #

runUnsafe :: PrimMonad prim => Builder -> prim String #

run the given builder and return the generated String

prefer `run`

# Emit functions

emit :: String -> Builder #

add a string in the builder

emitChar :: Char -> Builder #

emit a UTF8 char in the builder

# unsafe

unsafeStringBuilder :: Builder -> Builder #