Single- and multi-line wrapping of text data with configurable line size, margins and alignment modes.
Go
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
testdata
CONTRIBUTORS
LICENSE
README.md
wrap.go
wrap_test.go

README.md

Linewrap

This is a simple package which exposes two functions allowing uniform linewrapping of arbitrary input string data.

It allows line wrapping using customizable left/right offsets and alignment. Supported alignments are: Left, Right, Justified and Center.

Refer to wrap_test.go and the output in the testdata directory for usage examples.

Usage

go get github.com/jteeuwen/linewrap

License

Unless otherwise stated, all of the work in this project is subject to a 1-clause BSD license. Its contents can be found in the enclosed LICENSE file.