Documentation
¶
Index ¶
- func AnyToString[T any](v T) string
- func BoolToStr(v bool) string
- func BytesToHex(b []byte) string
- func FloatToStr(v float64, prec int) string
- func HexToBytes(s string) ([]byte, error)
- func Int64ToStr(v int64) string
- func IntToStr(v int) string
- func StrToBool(s string) (bool, error)
- func StrToFloat(s string) (float64, error)
- func StrToInt(s string) (int, error)
- func StrToInt64(s string) (int64, error)
- func StrToUint64(s string) (uint64, error)
- func Uint64ToStr(v uint64) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnyToString ¶
AnyToString 会根据类型优化常见路径,其他走 fmt.Sprintf 使用泛型支持任意类型到字符串的转换
func FloatToStr ¶
FloatToStr 将浮点数转换为字符串 prec 参数指定小数点后保留的位数
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.