intconv

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BigIntOne = big.NewInt(1)

Functions

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 BytesToSize

func BytesToSize(bs []byte) uint64

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 SizeToBytes

func SizeToBytes(v uint64) []byte

func Uint64ToBytes

func Uint64ToBytes(v uint64) []byte

Types

type BigInt

type BigInt struct {
	big.Int
}

func (BigInt) MarshalJSON

func (i BigInt) MarshalJSON() ([]byte, error)

func (*BigInt) UnmarshalJSON

func (i *BigInt) UnmarshalJSON(b []byte) error

Jump to

Keyboard shortcuts

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