Documentation ¶
Overview ¶
Package str provides enhanced string utilities
Index ¶
- Constants
- func Convert(src string, kind reflect.Kind) (retVal interface{})
- func InSlice(a string, list []string) bool
- func LowerFirst(str string) string
- func ToCamel(s string) string
- func ToDelimited(s string, del uint8) string
- func ToKebab(s string) string
- func ToLowerCamel(s string) string
- func ToScreamingDelimited(s string, del uint8, screaming bool) string
- func ToScreamingKebab(s string) string
- func ToScreamingSnake(s string) string
- func ToSnake(s string) string
- func UpperFirst(str string) string
Constants ¶
const EmptyString = ""
EmptyString the empty string ""
Variables ¶
This section is empty.
Functions ¶
func Convert ¶ added in v0.5.4
Convert convert string to specific data type
func InSlice ¶
InSlice check if specific string is in slice
func LowerFirst ¶
LowerFirst lower case first character of specific string
func ToDelimited ¶ added in v0.4.0
ToDelimited Converts a string to delimited.snake.case (in this case `del = '.'`)
func ToKebab ¶ added in v0.4.0
ToKebab Converts a string to kebab-case
func ToLowerCamel ¶ added in v0.4.0
ToLowerCamel converts a string to lowerCamelCase
func ToScreamingDelimited ¶ added in v0.4.0
ToScreamingDelimited Converts a string to SCREAMING.DELIMITED.SNAKE.CASE (in this case `del = '.'; screaming = true`) or delimited.snake.case (in this case `del = '.'; screaming = false`)
func ToScreamingKebab ¶ added in v0.4.0
ToScreamingKebab Converts a string to SCREAMING-KEBAB-CASE
func ToScreamingSnake ¶ added in v0.4.0
ToScreamingSnake Converts a string to SCREAMING_SNAKE_CASE
func ToSnake ¶ added in v0.4.0
ToSnake Converts a string to snake_case
Types ¶
This section is empty.