table-layout-0.8.0.0: Layout text as grid or table.

Text.Layout.Table.Primitives.Basic

Description

This module contains primitive modifiers for lists and Strings to be filled or fitted to a specific length.

Synopsis

# Cut marks

data CutMark Source #

Specifies how the place looks where a String has been cut. Note that the cut mark may be cut itself, to fit into a column.

Instances

 Source # A single ellipsis unicode character is used to show cut marks. Methods

Specify two different cut marks, one for cuts on the left and one for cuts on the right.

Use the cut mark on both sides by reversing it on the other.

Don't show any cut mark when text is cut.

# String-related tools

## Filling

Fill on the left until the String has the desired length.

Fill on the right until the String has the desired length.

Fill on both sides equally until the String has the desired length.

## Fitting

Fits to the given length by either trimming or filling it to the right.

Fits to the given length by either trimming or filling it to the right.

Fits to the given length by either trimming or filling it on both sides, but when only 1 character should be trimmed it will trim left.

## Applying cut marks

Applies a CutMark to the left of a String, while preserving the length.

Applies a CutMark to the right of a String, while preserving the length.

# List-related tools

## Filling

fillStart' :: a -> Int -> Int -> [a] -> [a] Source #

fillStart :: a -> Int -> [a] -> [a] Source #

fillEnd :: a -> Int -> [a] -> [a] Source #

fillBoth' :: a -> Int -> Int -> [a] -> [a] Source #

fillBoth :: a -> Int -> [a] -> [a] Source #