text

package
v1.6.9 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisplayWidth

func DisplayWidth(s string) int

DisplayWidth calculates what the rendered width of a string may be

func Indent

func Indent(s, indent string) string

func Truncate

func Truncate(maxWidth int, s string) string

Truncate shortens a string to fit the maximum display width

func TruncateColumn

func TruncateColumn(maxWidth int, s string) string

TruncateColumn replaces the first new line character with an ellipsis and shortens a string to fit the maximum display width

Types

This section is empty.

Jump to

Keyboard shortcuts

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