twrap.mod

module
v1.4.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2020 License: MIT

README

GoDoc

twrap.mod

This provides ways of wrapping and indenting text printed to the terminal.

You first construct a wrapper object TWConf and then you can use the various Wrap methods to print text indented and wrapped at the target line length.

Here is a simple example

twc, _ := twrap.NewTWConf()
twc.Wrap("the quality of mercy is not strained", 5)

More examples are available in the example test files.

There are also various Print functions which simply call fmt.Fprint functions and allow you to write:

twc.Print("Hello")

rather than:

fmt.Fprint(twc.W, "Hello")

Directories

Path Synopsis
Package twrap provides supporting functions for printing wrapped text.
Package twrap provides supporting functions for printing wrapped text.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL