Documentation ¶
Index ¶
- func BoolToString(b bool) string
- func InArray[T comparable](needle T, haystack []T) bool
- func IsEmpty(s string) bool
- func IsNotEmpty(s string) bool
- func LastFromSplit(input, split string) string
- func LcFirst(s string) string
- func Reverse(s string) string
- func Substring(s string, start, end int) (string, error)
- func ToBool(str string) bool
- func ToBoolE(str string) (bool, error)
- func ToCamel(s string) string
- func ToDelimited(s string, delim uint8) string
- func ToFloat32(str string) float32
- func ToFloat32E(str string) (float32, error)
- func ToFloat64(str string) float64
- func ToFloat64E(str string) (float64, error)
- func ToInt(str string) int
- func ToInt32(str string) int32
- func ToInt32E(str string) (int32, error)
- func ToInt64(str string) int64
- func ToInt64E(str string) (int64, error)
- func ToInt8(str string) int8
- func ToInt8E(str string) (int8, error)
- func ToIntE(str string) (int, error)
- func ToKebab(s string) string
- func ToLowerCamel(s string) string
- func ToScreamingDelimited(s string, delimiter uint8, ignore string, screaming bool) string
- func ToScreamingKebab(s string) string
- func ToSnake(s string) string
- func ToSnakeWithIgnore(s, ignore string) string
- func ToString(v interface{}) string
- func ToUint(str string) uint
- func ToUint8(str string) uint8
- func UcFirst(s string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InArray ¶
func InArray[T comparable](needle T, haystack []T) bool
InArray checks if a string is in a slice of haystack.
func LastFromSplit ¶
LastFromSplit returns the last part of a string split by a separator.
func ToBoolE ¶
ToBoolE converts a string to a bool. If the string is not a valid bool, it returns an error.
func ToDelimited ¶
func ToFloat32E ¶
ToFloat32E converts a string to float32. If the string is not a valid float32, it returns an error.
func ToFloat64E ¶
ToFloat64E converts a string to a float64. If the string is not a valid float64, it returns an error.
func ToInt32E ¶
ToInt32E converts a string to an int32. If the string is not a valid int32, it returns an error.
func ToInt64E ¶
ToInt64E converts a string to int64. If the string is not a valid int64, it returns an error.
func ToInt8E ¶
ToInt8E converts a string to int8. If the string is not a valid int8, it returns an error.
func ToLowerCamel ¶
func ToScreamingDelimited ¶
func ToScreamingKebab ¶
func ToSnakeWithIgnore ¶
Types ¶
This section is empty.