Documentation ¶
Index ¶
- func After(s string, substr string) string
- func AfterWord(s, substr string) string
- func Before(s string, substr string) string
- func Between(s, start, end string) string
- func BetweenIndex(s, start, end string) (int, int)
- func ContainsAny(s string, substr ...string) bool
- func ConvertCase(s string, inputCase, outputCase StyleCase) string
- func ConvertStringToCase(s string, outputCase StyleCase) string
- func FirstLower(s string) string
- func FirstUpper(s string) string
- func HasPrefixes(s string, prefix ...string) bool
- func HasStrings(s string, substr ...string) bool
- func HasSuffixes(s string, suffix ...string) bool
- func SplitAfter(s, sep, substr string) string
- func SplitByIndex(s, sep string, index int) string
- func SplitCamelCase(s string) []string
- func SplitKebabCase(s string) []string
- func SplitSnakeCase(s string) []string
- func Title(s string) string
- func ToCamel(values []string, firstWordLower bool) string
- func ToKebab(values []string) string
- func ToKebabAllUpper(values []string) string
- func ToPlural(s string) string
- func ToSnake(values []string) string
- func ToSnakeAllUpper(values []string) string
- type StyleCase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BetweenIndex ¶
BetweenIndex returns start and end indexes between two strings.
func ContainsAny ¶
ContainsAny returns true if the s contains any ony of the substr
func ConvertCase ¶
func ConvertStringToCase ¶
func FirstLower ¶
func FirstUpper ¶
func HasPrefixes ¶
HasPrefixes returns string contains any one of the prefixes.
func HasStrings ¶
HasStrings returns true if the s equal any one of the substr
func HasSuffixes ¶
HasSuffixes returns string contains any one of the suffixes.
func SplitAfter ¶
SplitAfter returns a string after substr from the split string
func SplitByIndex ¶
SplitByIndex returns a string by index from the split string
func SplitCamelCase ¶
func SplitKebabCase ¶
func SplitSnakeCase ¶
func ToKebabAllUpper ¶
func ToSnakeAllUpper ¶
Types ¶
type StyleCase ¶
type StyleCase int
const ( NoneCase StyleCase = iota // CamelCase is CamelCase CamelCase // CamelCaseFirstLower is camelCase CamelCaseFirstLower // SnakeCase is snake_case SnakeCase // SnakeCaseAllUpper is SNAKE_CASE SnakeCaseAllUpper // KebabCase is kebab-case KebabCase // KebabCaseAllUpper is KEBAB-CASE KebabCaseAllUpper )
Click to show internal directories.
Click to hide internal directories.