stringutil

package
v0.0.0-...-a0a6b0b Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2023 License: Unlicense Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Quantify

func Quantify(n int, singular, plural string) string

Quantify returns a string with the quantity and the correct form of the word, depending on the quantity.

func Trim

func Trim(s string, max int) string

Trim trims a string to a maximum length, appending an ellipsis if necessary. The trimmed string with ellipsis will never be longer than max. Works with ANSI escape codes.

Types

This section is empty.

Jump to

Keyboard shortcuts

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