Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Text.Wrap
Synopsis
- data WrapSettings = WrapSettings {}
- defaultWrapSettings :: WrapSettings
- wrapTextToLines :: WrapSettings -> Int -> Text -> [Text]
- wrapText :: WrapSettings -> Int -> Text -> Text
Documentation
data WrapSettings Source #
Settings to control how wrapping is performed.
Constructors
WrapSettings | |
Fields
|
Instances
Eq WrapSettings Source # | |
Defined in Text.Wrap | |
Read WrapSettings Source # | |
Defined in Text.Wrap Methods readsPrec :: Int -> ReadS WrapSettings # readList :: ReadS [WrapSettings] # | |
Show WrapSettings Source # | |
Defined in Text.Wrap Methods showsPrec :: Int -> WrapSettings -> ShowS # show :: WrapSettings -> String # showList :: [WrapSettings] -> ShowS # |
wrapTextToLines :: WrapSettings -> Int -> Text -> [Text] Source #
Wrap text at the specified width. Newlines and whitespace in the input text are preserved. Returns the lines of text in wrapped form. New lines introduced due to wrapping will have leading whitespace stripped.
wrapText :: WrapSettings -> Int -> Text -> Text Source #
Like wrapTextToLines
, but returns the wrapped text reconstructed
with newlines inserted at wrap points.