hiboot: hidevops.io/hiboot/pkg/utils/str Index | Files

package str

import "hidevops.io/hiboot/pkg/utils/str"

Package str provides enhanced string utilities


Package Files

camel.go number.go snake.go strings.go


const EmptyString = ""

EmptyString the empty string ""

func Convert Uses

func Convert(src string, kind reflect.Kind) (retVal interface{})

Convert convert string to specific data type

func InSlice Uses

func InSlice(a string, list []string) bool

InSlice check if specific string is in slice

func LowerFirst Uses

func LowerFirst(str string) string

LowerFirst lower case first character of specific string

func ToCamel Uses

func ToCamel(s string) string

ToCamel Converts a string to CamelCase

func ToDelimited Uses

func ToDelimited(s string, del uint8) string

ToDelimited Converts a string to delimited.snake.case (in this case `del = '.'`)

func ToKebab Uses

func ToKebab(s string) string

ToKebab Converts a string to kebab-case

func ToLowerCamel Uses

func ToLowerCamel(s string) string

ToLowerCamel converts a string to lowerCamelCase

func ToScreamingDelimited Uses

func ToScreamingDelimited(s string, del uint8, screaming bool) string

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 Uses

func ToScreamingKebab(s string) string

ToScreamingKebab Converts a string to SCREAMING-KEBAB-CASE

func ToScreamingSnake Uses

func ToScreamingSnake(s string) string

ToScreamingSnake Converts a string to SCREAMING_SNAKE_CASE

func ToSnake Uses

func ToSnake(s string) string

ToSnake Converts a string to snake_case

func UpperFirst Uses

func UpperFirst(str string) string

UpperFirst upper case first character of specific string

Package str imports 5 packages (graph) and is imported by 20 packages. Updated 2019-05-20. Refresh now. Tools for package owners.