conversion

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2024 License: Apache-2.0 Imports: 5 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromFloat32 added in v0.0.13

func FromFloat32(value float32) string

func FromFloat64 added in v0.0.13

func FromFloat64(value float64) string

func FromInt added in v0.0.13

func FromInt(value int) string

func FromInt16 added in v0.0.13

func FromInt16(value int16) string

func FromInt32 added in v0.0.13

func FromInt32(value int32) string

func FromInt64 added in v0.0.13

func FromInt64(value int64) string

func FromInt8 added in v0.0.13

func FromInt8(value int8) string

func FromUint added in v0.0.13

func FromUint(value uint) string

func FromUint16 added in v0.0.13

func FromUint16(value uint16) string

func FromUint32 added in v0.0.13

func FromUint32(value uint32) string

func FromUint64 added in v0.0.13

func FromUint64(value uint64) string

func FromUint8 added in v0.0.13

func FromUint8(value uint8) string

func ToFloat32 added in v0.0.13

func ToFloat32(value string) float32

func ToFloat64 added in v0.0.13

func ToFloat64(value string) float64

func ToInt added in v0.0.13

func ToInt(value string) int

func ToInt16 added in v0.0.13

func ToInt16(value string) int16

func ToInt32 added in v0.0.13

func ToInt32(value string) int32

func ToInt64 added in v0.0.13

func ToInt64(value string) int64

func ToInt8 added in v0.0.13

func ToInt8(value string) int8

func ToUint added in v0.0.13

func ToUint(value string) uint

func ToUint16 added in v0.0.13

func ToUint16(value string) uint16

func ToUint32 added in v0.0.13

func ToUint32(value string) uint32

func ToUint64 added in v0.0.13

func ToUint64(value string) uint64

func ToUint8 added in v0.0.13

func ToUint8(value string) uint8

Types

type Binaries

type Binaries []*Binary

Binaries 定义二进制数组

func NewFormBytes

func NewFormBytes(bytes []byte) *Binaries

NewFormBytes 通过bytes转换

func (*Binaries) RawType

func (b *Binaries) RawType() []*Binary

RawType 获取原始[]*Binary类型

func (*Binaries) To2Hex

func (b *Binaries) To2Hex(char ...string) string

To2Hex 每位转换2位hex字符串

func (*Binaries) To8Bits

func (b *Binaries) To8Bits(char ...string) (string, error)

To8Bits 每位转换8长度二进制字符串

type Binary

type Binary struct {
	// contains filtered or unexported fields
}

Binary 定义二进制值

func NewFromByte

func NewFromByte(decimal byte) *Binary

NewFromByte 通过byte转换

func NewFromDecimal

func NewFromDecimal(decimal int64) *Binary

NewFromDecimal 通过指定十进制数据转换

func NewFromRawBinary

func NewFromRawBinary(rawBinary string) (*Binary, error)

NewFromRawBinary 通过原始二进制值转换 010010110101

func NewFromRawHex

func NewFromRawHex(rawHex string) (*Binary, error)

NewFromRawHex 通过指定的原始hex值转换 ff

func (*Binary) To2Hex

func (b *Binary) To2Hex() (string, error)

To2Hex 将该二进制值转化为hex 2位

func (*Binary) To8Bit

func (b *Binary) To8Bit() (string, error)

To8Bit 将该二进制值转换为计算机bit 8位

func (*Binary) ToHexValue

func (b *Binary) ToHexValue() string

ToHexValue 转换位原始hex值

func (*Binary) Value

func (b *Binary) Value() string

Value 输出二进制值

Jump to

Keyboard shortcuts

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