Documentation ¶
Index ¶
- func BytesToInt64(bys []byte) int64
- func BytesToString(b *[]byte) *string
- func Float64ToString(a float64) string
- func Int16ToString(a int16) string
- func Int32ToString(a int32) string
- func Int64ToBytes(n int64) []byte
- func Int64ToString(a int64) string
- func IntToString(a int) string
- func StringToBool(s string) bool
- func StringToFloat64(s string) float64
- func StringToInt(s string, optionalNum ...int) int
- func StringToInt16(s string) int16
- func StringToInt32(s string) int32
- func StringToInt32Slice(s string, sep string) (ret []int32)
- func StringToInt64(s string) int64
- func StringToUint(s string) uint
- func StringToUint16(s string) uint16
- func StringToUint32(s string) uint32
- func StringToUint64(s string) uint64
- func ToString(v interface{}) string
- func ToStringSlice(v interface{}) []string
- func ToStringSliceWithSort(v any) []string
- func ToStringWithSort(v any) string
- func Uint16ToString(a uint16) string
- func Uint32ToString(a uint32) string
- func Uint64SliceToInterfaceSlice(a []uint64) []interface{}
- func Uint64ToString(a uint64) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BytesToInt64 ¶
func Int64ToBytes ¶
func StringToInt32Slice ¶
StringToInt32Slice :
func ToString ¶
func ToString(v interface{}) string
ToString convert some type to string []string{"a","b"} => "a,b" []int{1,2} => "1,2" []string{} => ""
func ToStringSliceWithSort ¶
ToStringSliceWithSort converts elements into the string and provides a sorted slice.
func ToStringWithSort ¶
ToStringWithSort converts some type to string with sort by acs []string{"b", "c", "a"} => "a,b,c" []int{1, 3, 2} => "1,2,3" []int64{21, 34, 29, 17, 33} => "17,21,29,33,34" []float64{3.14, 3.15, 3.02, 2.98} => "2.98,3.02,3.14,3.15" If `v` is `[]string`, the original slice will not be modified because of deep copy in this function.
func Uint64SliceToInterfaceSlice ¶
func Uint64SliceToInterfaceSlice(a []uint64) []interface{}
Uint64SliceToInterfaceSlice : []uint64 -> []interface{}
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.