Documentation ¶
Index ¶
- func Atob(s string) (b []byte)
- func Atoc128(s string) (ret complex128, err error)
- func Atoc64(s string) (ret complex64, err error)
- func Atof32(s string) (ret float32, err error)
- func Atof64(s string) (ret float64, err error)
- func Atoi(s string) (ret int, err error)
- func Atoi16(s string) (ret int16, err error)
- func Atoi32(s string) (ret int32, err error)
- func Atoi64(s string) (ret int64, err error)
- func Atoi8(s string) (ret int8, err error)
- func Atoui(s string) (ret uint, err error)
- func Atoui16(s string) (ret uint16, err error)
- func Atoui32(s string) (ret uint32, err error)
- func Atoui64(s string) (ret uint64, err error)
- func Atoui8(s string) (ret uint8, err error)
- func Bool2Byte(bo bool) (by []byte)
- func Bool2Int(b bool) (i int)
- func Bool2Str(b bool) (s string)
- func Bool2Uint(b bool) (i uint)deprecated
- func Btoa(b []byte) (ret string)
- func Byte2Bool(by []byte) (bo bool)
- func Byte2Int(b []byte) (ret int, err error)
- func Ctoa[cmx constraints.Complex](f cmx) (ret string)
- func Datetime2Date(t time.Time) (ret time.Time)
- func FlatMap2Struct(flatMap map[string]string, structure any, keyDic ...map[string]string) (err error)
- func Ftoa[floatx constraints.Float](f floatx) (ret string)
- func Hankaku2Zenkaku(str string) (ret string)
- func I16toa(i int16) (ret string)deprecated
- func I32toa(i int32) (ret string)deprecated
- func I64toa(i int64) (ret string)deprecated
- func I8toa(i int8) (ret string)deprecated
- func Int2Bool[INT constraints.Integer](i INT) (b bool)
- func Int2Byte[intx constraints.Signed](i intx) (ret []byte)
- func Itoa[intx constraints.Signed](i intx) (ret string)
- func Str2Bool(s string) (ret bool, err error)
- func Struct2FlatMap(structure any, keyDic ...map[string]string) (ret map[string]string, err error)
- func Struct2Json(structure any) (jsonStr string, err error)
- func Ui16toa(ui uint16) (ret string)deprecated
- func Ui32toa(ui uint32) (ret string)deprecated
- func Ui64toa(ui uint64) (ret string)deprecated
- func Ui8toa(ui uint8) (ret string)deprecated
- func Uint2Bool(i uint) (b bool)deprecated
- func Uitoa[uintx constraints.Unsigned](ui uintx) (ret string)
- func Zenkaku2Hankaku(str string) (ret string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Atoc128 ¶ added in v1.1.0
func Atoc128(s string) (ret complex128, err error)
func Ctoa ¶ added in v1.1.0
func Ctoa[cmx constraints.Complex](f cmx) (ret string)
Ctoa converts a Complex (complex64, complex128) to a string. The representation precision is complex64 compliant.
func FlatMap2Struct ¶ added in v1.1.0
func FlatMap2Struct(flatMap map[string]string, structure any, keyDic ...map[string]string) (err error)
FlatMap2Struct deserializes a one-level map[string]string into an arbitrary structure. The one-level map[string]string uses the `json` tag of the structure entered for the key. If undefined, it substitutes the field name of the structure. If you want to specify an arbitrary key for an arbitrary field, you can specify map[string]string with the field name as key in keyDic. keyDic is used in preference to the `json` tag.
func Ftoa ¶ added in v1.1.0
func Ftoa[floatx constraints.Float](f floatx) (ret string)
Ftoa converts a Float (float32, float64) to a string. The representation precision is float64 compliant.
func Hankaku2Zenkaku ¶
func Int2Bool ¶
func Int2Bool[INT constraints.Integer](i INT) (b bool)
func Int2Byte ¶
func Int2Byte[intx constraints.Signed](i intx) (ret []byte)
func Itoa ¶
func Itoa[intx constraints.Signed](i intx) (ret string)
Itoa converts an int* to a string.
func Struct2FlatMap ¶ added in v1.1.0
Struct2FlatMap serializes a structure into a one-level map[string]string. The one-level map[string]string uses the `json` tag of the structure entered for the key. If undefined, it substitutes the field name of the structure. If you want to specify an arbitrary key for an arbitrary field, you can specify map[string]string with the field name as key in keyDic. keyDic is used in preference to the `json` tag.
func Struct2Json ¶
func Uitoa ¶
func Uitoa[uintx constraints.Unsigned](ui uintx) (ret string)
Uitoa converts an uint* to a string.
func Zenkaku2Hankaku ¶
Types ¶
This section is empty.