go-wordwrap – github.com/mitchellh/go-wordwrap Index | Files

package wordwrap

import "github.com/mitchellh/go-wordwrap"

Index

Functions

func WrapString

func WrapString(s string, lim uint) string

WrapString wraps the given string within lim width in characters.

Wrapping is currently naive and only happens at white-space. A future version of the library will implement smarter wrapping. This means that pathological cases can dramatically reach past the limit, such as a very long word.

Source Files

wordwrap.go

Version
v1.0.0
Published
Aug 28, 2018
Platform
linux/amd64
Imports
2 packages
Last checked
now

Tools for package owners.