text

package
v0.3.9 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CamelToKebab

func CamelToKebab(str string) string

Copied from: https://github.com/asaskevich/govalidator

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 ReplaceExcessiveWhitespace

func ReplaceExcessiveWhitespace(s string) string

func Title

func Title(str 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