Documentation ¶
Index ¶
- func CutRune(str string, n int) string
- func GetMimeType(name string) string
- func ToCamelString(s string) string
- func ToFloat(value any, defVal ...float64) float64
- func ToInt(value any, defVal ...int) int
- func ToInt64(value any, defVal ...int64) int64
- func ToSnakeString(s string) string
- func ToString(value any, defVal ...string) string
- func ToUint(value any, defVal ...uint) uint
- func ToUint64(value any, defVal ...uint64) uint64
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToFloat ¶ added in v0.3.6
ToFloat 转换为float64类型 value 可以是数字、数字字符串 如果value不能转换为数字,则返回默认值defVal defVal 提供默认值,如果没有,则视为0
func ToInt64 ¶
ToInt64 转换为int64类型 value 可以是数字、数字字符串 如果value不能转换为数字,则返回默认值defVal defVal 提供默认值,如果没有,则视为0
func ToSnakeString ¶
ToSnakeString snake string, XxYy to xx_yy , XxYY to xx_yy
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.