| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Text.Layout.Table.StringBuilder
Synopsis
- class Monoid a => StringBuilder a where
- stringB :: String -> a
- charB :: Char -> a
- textB :: Text -> a
- replicateCharB :: Int -> Char -> a
- spacesB :: StringBuilder a => Int -> a
- remSpacesB' :: StringBuilder b => Int -> Int -> b
Documentation
class Monoid a => StringBuilder a where Source #
A type that is used to construct parts of a table.
Methods
stringB :: String -> a Source #
Create a builder with a String.
Create a builder with a single Char.
Create a builder with a Text.
replicateCharB :: Int -> Char -> a Source #
Create a builder with several Chars.
Instances
| StringBuilder Text Source # | |
| StringBuilder Builder Source # | |
| StringBuilder String Source # | |
| StringBuilder (Endo String) Source # | |
spacesB :: StringBuilder a => Int -> a Source #
Create a builder that contains k spaces. Negative numbers are treated as zero.
Arguments
| :: StringBuilder b | |
| => Int | The expected length. |
| -> Int | The actual length. |
| -> b |
Creates a StringBuilder with the amount of missing spaces.