Documentation ¶
Index ¶
- func Convert[T any](source any, defVal T) T
- func ConvertValue(source any, defValType reflect.Type) any
- func EqualTo1(source any, sourceKind reflect.Kind) bool
- func HashCode(s string) uint32
- func HashCode64(s string) int64
- func HashCodes(strings []string) uint32
- func IsEqual[TValue any](val1, val2 TValue) bool
- func NumberToString(source any, sourceKind reflect.Kind) string
- func RandString(length int) string
- func StringToNumber(source string, defVal any, defValKind reflect.Kind) any
- func ToBool(source any) bool
- func ToFloat32(source any) float32
- func ToFloat64(source any) float64
- func ToInt(source any) int
- func ToInt16(source any) int16
- func ToInt32(source any) int32
- func ToInt64(source any) int64
- func ToInt8(source any) int8
- func ToString(source any) string
- func ToTime(source any) time.Time
- func ToUInt(source any) uint
- func ToUInt16(source any) uint16
- func ToUInt32(source any) uint32
- func ToUInt64(source any) uint64
- func ToUInt8(source any) uint8
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertValue ¶ added in v0.3.0
ConvertValue 通用的类型转换
func NumberToString ¶ added in v0.13.0
func StringToNumber ¶ added in v0.13.0
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.