Documentation ¶
Index ¶
- func Append(strs ...string) string
- func AppendArray(s string, strs []string) string
- func At(s string, index int) string
- func AtRunes(r []rune, index int) string
- func Between(s, start, end string) (result []string)
- func CollapseWhitespace(s string) string
- func Contains(s, substr string, caseSensitive bool) bool
- func ContainsAll(s, chars string, caseSensitive bool) bool
- func ContainsAny(s, chars string, caseSensitive bool) bool
- func CountSubstr(s, sep string, caseSensitive bool) int
- func EndsWith(s, search string, caseSensitive bool) bool
- func EnsureLeft(s, substr string, caseSensitive bool) string
- func EnsureRight(s, substr string, caseSensitive bool) string
- func Insert(s, substr string, index int) string
- func Length(s string) int
- func PaddingBoth(s, pad string, length int) string
- func PaddingLeft(s, pad string, length int) string
- func PaddingRight(s, pad string, length int) string
- func Prepend(s string, strs ...string) string
- func PrependArray(s string, strs []string) string
- func RemoveLeft(s, substr string, caseSensitive bool) string
- func RemoveRight(s, substr string, caseSensitive bool) string
- func Reverse(s string) string
- func Runes(s string) []rune
- func Shuffle(s string) string
- func StartsWith(s, search string, caseSensitive bool) bool
- func Substr(s string, start int) string
- func SubstrLen(s string, start, length int) (str string)
- func Surround(s, substr string) string
- func SurroundPad(s, pad string, leftPad, rightPad int) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendArray ¶
AppendArray appends an array of strings to the string s.
func CollapseWhitespace ¶
CollapseWhitespace replaces consecutive whitespace characters with a single space in string s.
func ContainsAll ¶
ContainsAll reports whether all of Unicode code points in chars contained in s.
func ContainsAny ¶
ContainsAny reports whether any Unicode code points in chars are within s.
func CountSubstr ¶
CountSubstr counts the number of non-overlapping instances of sep in s.
func EnsureLeft ¶
EnsureLeft prepends substr to s if s doesn't starts with substr.
func EnsureRight ¶
EnsureRight appends substr to s if s doesn't ends with substr.
func PaddingBoth ¶
PaddingBoth pad a string to a certain length with another string in both right and left side.
func PaddingLeft ¶
PaddingLeft pad a string to a certain length with another string in left side.
func PaddingRight ¶
PaddingRight pad a string to a certain length with another string in right side.
func PrependArray ¶
PrependArray returns string s starting with array strigns strs.
func RemoveLeft ¶
RemoveLeft remove substr from start of string s if present.
func RemoveRight ¶
RemoveRight remove substr from end of string s if present.
func StartsWith ¶
StartsWith tests whether the string s starts with string search.
func SurroundPad ¶
SurroundPad repeats characters of pad around given string s. number of repeats in left and right side specifies by leftPad and rightPad.
Types ¶
This section is empty.