Documentation
¶
Index ¶
- func CamelToSnake(val, separator string) string
- func Cut(val string, separator string) (left, right string, found bool)
- func CutAny(val string, seperators ...string) (left, right string, found bool)
- func CutOut(val, leftBound, rightBound string) (remaining string, found bool)
- func CutOutAny(val string, leftBounds []string, rightBounds []string) (remaining string, found bool)
- func ReplaceManyWithOne(val string, needles []string, replacement string) string
- func SnakeToCamel(val, separator string) (res string)
- func TrimPrefixes(val string, prefixes ...string) string
- func TrimSuffixes(val string, suffixes ...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 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 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 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
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.