Documentation
¶
Index ¶
- func Len(s string) (l int)
- func PadLeft(s, glyph string, l int) string
- func PadLeftWithByte(s string, b byte, l int) string
- func PadRight(s, glyph string, l int) string
- func PadRightWithByte(s string, b byte, l int) string
- func TrimBytes(s string, cut byte) string
- func TrimLeftBytes(s string, cut byte) string
- func TrimRightBytes(s string, cut byte) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PadLeft ¶
PadLeft returns original string padded on the left side with glyph to length l. Length for this function is in glyphs, not bytes or runes. Passed glyph should be single glyph (printable char) else result will be of wrong length. But where is no check for that.
func PadLeftWithByte ¶
PadLeftWithBytes return original string padded on the left side with char b to length l. Length for this function is in bytes. So this function is good only for ascii strings.
func PadRight ¶
PadRight returns original string padded on the right side with glyph to length l. Length for this function is in glyphs, not bytes or runes. Passed glyph should be single glyph (printable char) else result will be of wrong length. But where is no check for that.
func PadRightWithByte ¶
PadRightWithBytes return original string padded on the left side with char b to length l. Length for this function is in bytes. So this function is good only for ascii strings.
func TrimLeftBytes ¶
func TrimRightBytes ¶
Types ¶
This section is empty.