Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Produce justified text, which is spread over multiple rows. For a simple
cut, chunksOf
from the split
package is best suited.
Synopsis
- justify :: Int -> [String] -> [String]
- justifyText :: Int -> String -> [String]
- dimorphicSummands :: Int -> Int -> [Int]
- dimorphicSummandsBy :: (Int -> a) -> Int -> Int -> [a]
- mixedDimorphicSummandsBy :: (Int -> a) -> Int -> Int -> [a]
Text justification
justify :: Int -> [String] -> [String] Source #
Fits as many words on a line as possible depending on the given width. Every line, except the last one, gets equally filled with spaces between the words as far as possible.