stringx

package
v0.0.18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 5, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AutoPtr added in v0.0.15

func AutoPtr(s string) *string

func Bool

func Bool(s string) (bool, error)

func BoolOr added in v0.0.16

func BoolOr(s string, or bool) bool

func Contains

func Contains(ss []string, c string) (index int, isContains bool)

func Float64 added in v0.0.16

func Float64(s string) (float64, error)

func Float64Or added in v0.0.16

func Float64Or(s string, or float64) float64

func Int

func Int(s string) (int, error)

func Int32

func Int32(s string) (int32, error)

func Int32Or added in v0.0.16

func Int32Or(s string, or int32) int32

func Int64

func Int64(s string) (int64, error)

func Int64Or added in v0.0.16

func Int64Or(s string, or int64) int64

func IntOr added in v0.0.16

func IntOr(s string, or int) int

func Join added in v0.0.16

func Join(sep string, ss ...string) string

func JoinNotEmpty added in v0.0.16

func JoinNotEmpty(sep string, ss ...string) string

func JsonFromObj added in v0.0.16

func JsonFromObj(o any) string

func JsonToObj added in v0.0.16

func JsonToObj[T any](s string) T

func Ptr

func Ptr(s string) *string

func ReplaceAll added in v0.0.15

func ReplaceAll(origin string, newVal string, oldVals ...string) string

func SnakeCase

func SnakeCase(input string) string

func ToBoolForce added in v0.0.16

func ToBoolForce(s string) bool

func ToFloat64Force added in v0.0.16

func ToFloat64Force(s string) float64

func ToInt32Force added in v0.0.16

func ToInt32Force(s string) int32

func ToInt64Force added in v0.0.16

func ToInt64Force(s string) int64

func ToIntForce added in v0.0.16

func ToIntForce(s string) int

func Trim

func Trim(s string) string

func TrimAll

func TrimAll(ss []string) []string

func TrimAllAndClean

func TrimAllAndClean(ss []string) []string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL