intKit

package
v2.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 3, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatInt16ToString

func FormatInt16ToString(i int16, base int) string

FormatInt16ToString 类型转换: int16 => string

@param base 进制(有效值: [2, 36])

func FormatInt32ToString

func FormatInt32ToString(i int32, base int) string

FormatInt32ToString 类型转换: int32 => string

@param base 进制(有效值: [2, 36])

func FormatInt64ToString

func FormatInt64ToString(i int64, base int) string

FormatInt64ToString 类型转换: int64 => string

@param base 进制(有效值: [2, 36])

func FormatInt8ToString

func FormatInt8ToString(i int8, base int) string

FormatInt8ToString 类型转换: int8 => string

@param base 进制(有效值: [2, 36])

func FormatIntToString

func FormatIntToString(i int, base int) string

FormatIntToString 类型转换: int => string

@param base 进制(有效值: [2, 36])

func FormatUint16ToString

func FormatUint16ToString(i uint16, base int) string

FormatUint16ToString 类型转换: uint16 => string

@param base 进制(有效值: [2, 36])

func FormatUint32ToString

func FormatUint32ToString(i uint32, base int) string

FormatUint32ToString 类型转换: uint32 => string

@param base 进制(有效值: [2, 36])

func FormatUint64ToString

func FormatUint64ToString(i uint64, base int) string

FormatUint64ToString 类型转换: uint64 => string

@param base 进制(有效值: [2, 36])

func FormatUint8ToString

func FormatUint8ToString(i uint8, base int) string

FormatUint8ToString 类型转换: uint8 => string

@param base 进制(有效值: [2, 36])

func IntToString

func IntToString(i int) string

func StringToInt

func StringToInt(str string) (int, error)

StringToInt 类型转换: string => int

func StringToIntWithDefault

func StringToIntWithDefault(str string, def int) int

StringToIntWithDefault 类型转换: string => int

func ToInt

func ToInt(obj interface{}) int

ToInt

e.g. (nil) => 0

func ToInt32

func ToInt32(obj interface{}) int32

func ToInt32E

func ToInt32E(obj interface{}) (int32, error)

func ToInt64

func ToInt64(obj interface{}) int64

func ToInt64E

func ToInt64E(obj interface{}) (int64, error)

func ToIntE

func ToIntE(obj interface{}) (int, error)

ToIntE

e.g. (nil) => 0 <nil> (false) => 0 <nil> (true) => 1 <nil> ("") => 0 unable to cast "" of type string to int64

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL