Documentation
¶
Index ¶
- func Join(list []string, delim string) string
- func PadLeft(str string, length int, pad byte) string
- func PadRight(str string, length int, pad byte) string
- func RuneWidth(s rune) int
- func StringWidth(s string) int
- func Strip(s string) string
- func Truncate(s string, length int) string
- func WrapString(text string, lineWidth int) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Join ¶
Join joins the list of the string with the delim provided. Returns an empty string for empty list
func PadLeft ¶
PadLeft returns a new string of a specified length in which the beginning of the current string is padded with spaces or with a specified Unicode character.
func PadRight ¶
PadRight returns a new string of a specified length in which the end of the current string is padded with spaces or with a specified Unicode character.
func StringWidth ¶
StringWidth returns the actual width of the string without colors
func Truncate ¶
Truncate resizes the string with the given length. It ellipses with '...' when the string's length exceeds the desired length or pads spaces to the right of the string when length is smaller than desired
func WrapString ¶
Types ¶
This section is empty.