intconv

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BigIntOne = big.NewInt(1)
View Source
var BigIntZero = &bigIntZero

Functions

func BigIntSafe added in v1.4.0

func BigIntSafe(i *big.Int) *big.Int

func BigIntSetBytes

func BigIntSetBytes(i *big.Int, bs []byte) *big.Int

func BigIntToBytes

func BigIntToBytes(i *big.Int) []byte

func BytesForZero

func BytesForZero() []byte

func BytesToInt64

func BytesToInt64(bs []byte) int64

func BytesToUint64

func BytesToUint64(bs []byte) uint64

func FormatBigInt

func FormatBigInt(i *big.Int) string

func FormatInt

func FormatInt(v int64) string

func FormatUint

func FormatUint(v uint64) string

func Int64ToBytes

func Int64ToBytes(v int64) []byte

func ParseBigInt

func ParseBigInt(i *big.Int, s string) error

func ParseInt

func ParseInt(s string, bits int) (int64, error)

func ParseUint

func ParseUint(s string, bits int) (uint64, error)

func SafeBytesToInt64 added in v1.3.1

func SafeBytesToInt64(bs []byte) (int64, bool)

func SafeBytesToSize added in v1.3.1

func SafeBytesToSize(bs []byte) (int, bool)

func SafeBytesToSize64 added in v1.3.1

func SafeBytesToSize64(bs []byte) (uint64, bool)

func SafeBytesToUint64 added in v1.3.1

func SafeBytesToUint64(bs []byte) (uint64, bool)

func SizeToBytes

func SizeToBytes(v uint64) []byte

func Uint64ToBytes

func Uint64ToBytes(v uint64) []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

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