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.1 (latest)
Published
Sep 25, 2020
Platform
js/wasm
Imports
2 packages
Last checked
now

Tools for package owners.