Documentation ¶
Index ¶
- func DisplayURL(urlStr string) string
- func DisplayWidth(s string) int
- func FuzzyAgo(a, b time.Time) string
- func FuzzyAgoAbbr(a, b time.Time) string
- func Indent(s, indent string) string
- func PadRight(maxWidth int, s string) string
- func Pluralize(num int, thing string) string
- func RemoveDiacritics(value string) string
- func RemoveExcessiveWhitespace(s string) string
- func Title(s string) string
- func Truncate(maxWidth int, s string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DisplayURL ¶
DisplayURL returns a copy of the string urlStr removing everything except the hostname and path. If there is an error parsing urlStr then urlStr is returned without modification.
func DisplayWidth ¶
func FuzzyAgoAbbr ¶
FuzzyAgoAbbr is an abbreviated version of FuzzyAgo. It 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.28.0
RemoveDiacritics returns the input value without "diacritics", or accent marks
func RemoveExcessiveWhitespace ¶
RemoveExcessiveWhitespace returns a copy of the string s with excessive whitespace removed.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.