Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Text.Layout.Table.Cell.Formatted
Description
Provides formatting to an instance of Cell
. For example, in a unix
terminal one could use the following:
>>>
buildCell (formatted "\ESC[31m" "Hello World!" "\ESC[0m") :: String
Hello World!
The text then appears in dull red.
Documentation
Instances
Functor Formatted Source # | |
IsString a => IsString (Formatted a) Source # | |
Defined in Text.Layout.Table.Cell.Formatted Methods fromString :: String -> Formatted a # | |
Cell a => Cell (Formatted a) Source # | |
Defined in Text.Layout.Table.Cell.Formatted Methods dropLeft :: Int -> Formatted a -> Formatted a Source # dropRight :: Int -> Formatted a -> Formatted a Source # dropBoth :: Int -> Int -> Formatted a -> Formatted a Source # visibleLength :: Formatted a -> Int Source # measureAlignment :: (Char -> Bool) -> Formatted a -> AlignInfo Source # buildCell :: StringBuilder b => Formatted a -> b Source # |