Documentation
¶
Index ¶
- func CamelCase(s string) string
- func IsEmpty(str string) bool
- func LcFirst(s string) string
- func Random(length int, hasSpecial ...bool) string
- func SnakeCase(s string) string
- func Stringify(v interface{}) string
- func Sub(s string, start, length int) string
- func ToFloat32WithDefaultZero(str string) float32
- func ToFloat32WithFallback(str string, fallback float32) float32
- func ToFloat64WithDefaultZero(str string) int
- func ToFloat64WithFallback(str string, fallback float64) float64
- func ToInt64WithDefaultZero(str string) int64
- func ToInt64WithFallback(str string, fallback int64) int64
- func ToIntWithDefaultZero(str string) int
- func ToIntWithFallback(str string, fallback int) int
- func ToUint64WithDefaultZero(str string) uint64
- func ToUint64WithFallback(str string, fallback uint64) uint64
- func UcFirst(s string) string
- func WithFallback(str, fallback string) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CamelCase ¶
*
- 蛇形转驼峰
- @description xx_yy to XxYx xx_y_y to XxYY
- @date 2020/7/30
- @param s要转换的字符串
- @return string *
func SnakeCase ¶
*
- 驼峰转蛇形 snake string
- @description XxYy to xx_yy , XxYY to xx_y_y
- @date 2020/7/30
- @param s 需要转换的字符串
- @return string *
func ToFloat32WithFallback ¶
func ToFloat64WithFallback ¶
func ToInt64WithDefaultZero ¶
func ToInt64WithFallback ¶
func ToIntWithDefaultZero ¶
func ToIntWithFallback ¶
func ToUint64WithDefaultZero ¶
func ToUint64WithFallback ¶
func WithFallback ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.