Documentation
¶
Index ¶
- func DedupeSlice(s []string, modifier func(string) string) []string
- func DedupeSortSlice(s []string, modifier func(string) string) []string
- func IntersectionSlice(one []string, two []string) []string
- func IsCamelCase(s string, extraRunes ...rune) bool
- func IsCapitalized(s string) bool
- func IsLowerSnakeCase(s string, extraRunes ...rune) bool
- func IsLowercase(s string) bool
- func IsUpperSnakeCase(s string, extraRunes ...rune) bool
- func IsUppercase(s string) bool
- func ToSnakeCase(s string) string
- func ToUpperSnakeCase(s string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DedupeSlice ¶
DedupeSlice returns s with no duplicates, in the same order. If modifier is not nil, modifier will be applied to each element in s.
func DedupeSortSlice ¶
DedupeSortSlice returns s with no duplicates, sorted. If modifier is not nil, modifier will be applied to each element in s.
func IntersectionSlice ¶
IntersectionSlice return the intersection between one and two, sorted.
func IsCamelCase ¶
IsCamelCase returns false if s is empty or contains any character that is not between 'A' and 'Z' or 'a' and 'z'. It does not care about lowercase or uppercase.
func IsCapitalized ¶
IsCapitalized returns true if is is not empty and the first letter is between 'A' and 'Z'.
func IsLowerSnakeCase ¶
IsLowerSnakeCase returns false if s is empty or contains any character that is not between 'a' and 'z' or '0' and '9' or '_', or if s begins or ends with '_'.
func IsLowercase ¶
IsLowercase returns true if s is not empty and is all lowercase.
func IsUpperSnakeCase ¶
IsUpperSnakeCase returns false if s is empty or contains any character that is not between 'A' and 'Z' or '0' and '9' or '_', or if s begins or ends with '_'.
func IsUppercase ¶
IsUppercase returns true if s is not empty and is all uppercase.
func ToSnakeCase ¶
ToSnakeCase converts s to Snake_case. It is assumed s has no spaces.
func ToUpperSnakeCase ¶
ToUpperSnakeCase converts s to UPPER_SNAKE_CASE.
Types ¶
This section is empty.