Documentation
¶
Index ¶
- func CamelToSnake(val, separator string, minWordSize int) string
- func ContainsAny(haystack string, needles ...string) bool
- func Cut(val string, separator string) (left, right string, found bool)
- func CutAny(val string, seperators ...string) (left, right string, found bool)
- func CutAt(val string, index int) (left, right string)
- func CutOut(val, leftBound, rightBound string) (remaining string, found bool)
- func CutOutAny(val string, leftBounds []string, rightBounds []string) (remaining string, found bool)
- func IsLowercase(val string) bool
- func IsUppercase(val string) bool
- func ReplaceManyWithOne(val string, needles []string, replacement string) string
- func SnakeToCamel(val, separator string, minWordSize int) (res string)
- func SplitSpace(val string) (parts []string)
- func TrimPrefixes(val string, prefixes ...string) string
- func TrimSuffixes(val string, suffixes ...string) string
- func WrapEach(val []string, prefix, suffix string) (res []string)
- func WrapEachJoin(val []string, prefix, suffix, sep string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CamelToSnake ¶ added in v0.7.5
Convert a camel string to snake case. Already snake cased strings aren't modified.
func ContainsAny ¶ added in v0.11.3
The way strings.ContainsAny should be implemented instead of a character check
func CutOutAny ¶
func CutOutAny(val string, leftBounds []string, rightBounds []string) (remaining string, found bool)
Extract the part of a string surrounded by multiple sets of separators
func IsLowercase ¶ added in v0.8.9
Determines if all characters in a string are lowercase
func IsUppercase ¶ added in v0.8.9
Determines if all characters in a string are uppercase
func ReplaceManyWithOne ¶ added in v0.3.0
Like ReplaceAll, but for replacing several sequences at once
func SnakeToCamel ¶ added in v0.7.5
Convert a snake cased string to camel case. Ignores strings that already have camel casing.
func SplitSpace ¶ added in v0.9.21
Split a string on space characters and trim leading/trailing space from each part
func TrimPrefixes ¶ added in v0.3.0
Like TrimPrefix, but for removing several prefixes at the same time
func TrimSuffixes ¶ added in v0.3.0
Like TrimSuffix, but for removing several suffixes at the same time
func WrapEachJoin ¶ added in v0.11.2
WrapEachJoin wraps each member of a slice in the prefix and suffix, then calls strings.Join
Types ¶
This section is empty.