Documentation
¶
Index ¶
- func Indent(s string, nspaces int) string
- func IndentAndTrim(s string, nspaces int) string
- func Pad(s string, width int) string
- func PadWidth(s string, width int) int
- func PadWith(s string, with rune, width int) string
- func Repeat(s string, n int) string
- func RightPad(s string, width int) string
- func RightPadWith(s string, with rune, width int) string
- func Width(s string) int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Indent ¶ added in v0.0.3
Indent splits the given string by \n and prefix each line with the given amount of spaces
func IndentAndTrim ¶ added in v0.0.3
IndentAndTrim is like Indent but any previous leading (left) spaces are removed.
func PadWith ¶ added in v0.0.2
PadWith acts like Pad but paddings with the given rune instead of a space
func RightPad ¶ added in v0.0.2
RightPad right-pads the given string to the given target width with spaces
func RightPadWith ¶ added in v0.0.2
RightPadWith acts like RightPad but paddings with the given rune instead of a space
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.