word-wrap-0.4.1: A library for word-wrapping

Text.Wrap

Synopsis

# Documentation

Settings to control how wrapping is performed.

Constructors

 WrapSettings FieldspreserveIndentation :: BoolWhether to indent new lines created by wrapping when their original line was indented.breakLongWords :: BoolWhether to break in the middle of the first word on a line when that word exceeds the wrapping width.

Instances

 Source # Methods Source # Methods Source # MethodsshowList :: [WrapSettings] -> ShowS #

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.

Like wrapTextToLines, but returns the wrapped text reconstructed with newlines inserted at wrap points.