conv

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bytes2ToInt16

func Bytes2ToInt16(b []byte) int16

func Bytes2ToUInt16

func Bytes2ToUInt16(b []byte) uint16

func Bytes4ToFloat32

func Bytes4ToFloat32(bytes []byte) float32

*

*

func Bytes4ToInt32

func Bytes4ToInt32(b []byte) int32

func Bytes4ToUInt32

func Bytes4ToUInt32(b []byte) uint32

func Bytes8ToFloat64

func Bytes8ToFloat64(bytes []byte) float64

*

*

func Float32Bytes4

func Float32Bytes4(float float32) []byte

*

*

func Float64ToBytes8

func Float64ToBytes8(float float64) []byte

func HexStr2int

func HexStr2int(hexStr string) (int, error)

HexStr2int converts hex format string to decimal number.

func Int2HexStr

func Int2HexStr(num int) (hex string)

Int2HexStr converts decimal number to hex format string.

func ToStr

func ToStr(value interface{}, args ...int) (s string)

Convert any type to string.

Types

type StrTo

type StrTo string

Convert string to specify type.

func (StrTo) Exist

func (f StrTo) Exist() bool

func (StrTo) Float64

func (f StrTo) Float64() (float64, error)

func (StrTo) Int

func (f StrTo) Int() (int, error)

func (StrTo) Int64

func (f StrTo) Int64() (int64, error)

func (StrTo) MustFloat64

func (f StrTo) MustFloat64() float64

func (StrTo) MustInt

func (f StrTo) MustInt() int

func (StrTo) MustInt64

func (f StrTo) MustInt64() int64

func (StrTo) MustUint8

func (f StrTo) MustUint8() uint8

func (StrTo) String

func (f StrTo) String() string

func (StrTo) Uint8

func (f StrTo) Uint8() (uint8, error)

Jump to

Keyboard shortcuts

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