convert

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2022 License: BSD-2-Clause Imports: 10 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BinToDec

func BinToDec(bin string) int64

BinToDec returns the decimal int64 result converted by binary string bin.

func BinToHex

func BinToHex(bin string) string

BinToHex returns the hexadecimal string result converted by binary string bin.

func BytesEncodeHex

func BytesEncodeHex(bytes []byte) string

BytesEncodeHex returns the hexadecimal encoding string result of byte slice bytes.

func BytesEncodeHexs

func BytesEncodeHexs(bytes []byte) []byte

BytesEncodeHexs returns the hexadecimal encoding byte slice result of byte slice bytes.

func BytesToFloat64

func BytesToFloat64(bytes []byte) float64

BytesToFloat64 returns the float64 result converted by byte slice bytes.

func BytesToInt64

func BytesToInt64(bytes []byte) int64

BytesToInt64 returns the int64 result converted by byte slice bytes.

func BytesToRunes

func BytesToRunes(bytes []byte) []rune

BytesToRunes returns the rune slice result converted by byte slice bytes.

func BytesToUint64

func BytesToUint64(bytes []byte) uint64

BytesToUint64 returns the uint64 result converted by byte slice bytes.

func DecToBin

func DecToBin(dec int64) string

DecToBin returns the binary string result converted by decimal int64 dec.

func DecToHex

func DecToHex(dec int64) string

DecToHex returns the hexadecimal string result converted by decimal int64 dec.

func Float64ToBytes

func Float64ToBytes(f float64) []byte

Float64ToBytes returns the byte slice result converted by float64 f.

func HexDecodeBytes

func HexDecodeBytes(h string) []byte

HexDecodeBytes returns the byte slice result represented by the hexadecimal string h.

func HexToBin

func HexToBin(hex string) string

HexToBin returns the binary string result converted by hexadecimal string hex.

func HexToDec

func HexToDec(hex string) int64

HexToDec returns the decimal int64 result converted by hexadecimal string hex.

func HexsDecodeBytes

func HexsDecodeBytes(hs []byte) []byte

HexsDecodeBytes returns the byte slice result represented by the hexadecimal byte slice hs.

func Int64ToBytes

func Int64ToBytes(i int64) []byte

Int64ToBytes returns the byte slice result converted by int64 i.

func RunesToBytes

func RunesToBytes(runes []rune) []byte

RunesToBytes returns the byte slice result converted by rune slice runes.

func StructToInterfaceMap

func StructToInterfaceMap(s interface{}, ignoreZeroValue ...bool) map[string]interface{}

StructToInterfaceMap returns the map[string]interface{} result converted by struct s.

func StructToStringMap

func StructToStringMap(s interface{}, ignoreZeroValue ...bool) map[string]string

StructToStringMap returns the map[string]string result converted by struct s.

func ToBase

func ToBase(src string, fromBase, toBase int) string

ToBase returns the toBase string result converted by fromBase string src.

func ToBool

func ToBool(src interface{}) bool

ToBool returns the bool result converted by src.

func ToFloat

func ToFloat(src interface{}) float64

ToFloat returns the float64 result converted by src.

func ToFloat32

func ToFloat32(src interface{}) float32

ToFloat32 returns the float32 result converted by src.

func ToFloat64

func ToFloat64(src interface{}) float64

ToFloat64 returns the float64 result converted by src.

func ToInt

func ToInt(src interface{}) int

ToInt returns the int result converted by src.

func ToInt32

func ToInt32(src interface{}) int32

ToInt32 returns the int32 result converted by src.

func ToInt64

func ToInt64(src interface{}) int64

ToInt64 returns the int64 result converted by src.

func ToString

func ToString(src interface{}) string

ToString returns the string result converted by src.

func ToUint

func ToUint(src interface{}) uint

ToUint returns the uint result converted by src.

func ToUint32

func ToUint32(src interface{}) uint32

ToUint32 returns the uint32 result converted by src.

func ToUint64

func ToUint64(src interface{}) uint64

ToUint64 returns the uint64 result converted by src.

func Uint64ToBytes

func Uint64ToBytes(i uint64) []byte

Uint64ToBytes returns the byte slice result converted by uint64 i.

Types

This section is empty.

Jump to

Keyboard shortcuts

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