wrap

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HardWrap

func HardWrap(s string, maxWidth int) string

HardWrap inserts newlines so that no output line exceeds maxWidth runes. It breaks at exact rune boundaries with no regard for word boundaries.

func SoftWrap

func SoftWrap(text string, maxWidth int) []string

SoftWrap breaks text into lines at word boundaries, falling back to hard breaks for words longer than maxWidth.

Types

This section is empty.

Jump to

Keyboard shortcuts

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