strs

package
v0.0.0-...-2c5f5e2 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CamelCase

func CamelCase(s string) string

*

  • 蛇形转驼峰
  • @description xx_yy to XxYx xx_y_y to XxYY
  • @date 2020/7/30
  • @param s要转换的字符串
  • @return string *

func IsEmpty

func IsEmpty(str string) bool

func LcFirst

func LcFirst(s string) string

func Random

func Random(length int, hasSpecial ...bool) string

func SnakeCase

func SnakeCase(s string) string

*

  • 驼峰转蛇形 snake string
  • @description XxYy to xx_yy , XxYY to xx_y_y
  • @date 2020/7/30
  • @param s 需要转换的字符串
  • @return string *

func Stringify

func Stringify(v interface{}) string

func Sub

func Sub(s string, start, length int) string

func ToFloat32WithDefaultZero

func ToFloat32WithDefaultZero(str string) float32

func ToFloat32WithFallback

func ToFloat32WithFallback(str string, fallback float32) float32

func ToFloat64WithDefaultZero

func ToFloat64WithDefaultZero(str string) int

func ToFloat64WithFallback

func ToFloat64WithFallback(str string, fallback float64) float64

func ToInt64WithDefaultZero

func ToInt64WithDefaultZero(str string) int64

func ToInt64WithFallback

func ToInt64WithFallback(str string, fallback int64) int64

func ToIntWithDefaultZero

func ToIntWithDefaultZero(str string) int

func ToIntWithFallback

func ToIntWithFallback(str string, fallback int) int

func ToUint64WithDefaultZero

func ToUint64WithDefaultZero(str string) uint64

func ToUint64WithFallback

func ToUint64WithFallback(str string, fallback uint64) uint64

func UcFirst

func UcFirst(s string) string

func WithFallback

func WithFallback(str, fallback 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