Documentation ¶
Overview ¶
Package text is a set of utility functions for text processing and outputting to the terminal.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DisplayWidth ¶
DisplayWidth calculates what the rendered width of string s will be.
func Indent ¶
Indent returns a copy of the string s with indent prefixed to it, will apply indent to each line of the string.
func PadRight ¶ added in v2.5.0
PadRight returns a copy of the string s that has been padded on the right with whitespace to fit the maximum display width.
func Pluralize ¶
Pluralize returns a concatenated string with num and the plural form of thing if necessary.
func RelativeTimeAgo ¶
RelativeTimeAgo returns a human readable string of the time duration between a and b that is estimated to the nearest unit of time.
func RemoveDiacritics ¶ added in v2.3.0
RemoveDiacritics returns the input value without "diacritics", or accent marks.
Types ¶
This section is empty.