ints

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Unlicense Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type T

type T struct {
	N uint64
}

func New

func New[V uint | no | uint64 | uint32 | uint16 | uint8 | int64 | int32 | int16 | int8](n V) *T

func (*T) Int64 added in v1.2.41

func (n *T) Int64() int64

func (*T) Marshal added in v1.2.40

func (n *T) Marshal(dst by) (b by)

func (*T) Uint16

func (n *T) Uint16() uint16

func (*T) Uint64

func (n *T) Uint64() uint64

func (*T) Unmarshal added in v1.2.40

func (n *T) Unmarshal(b by) (r by, err er)

Unmarshal reads a string, which must be a positive integer no larger than math.MaxUint64, skipping any non-numeric content before it.

Note that leading zeros are not considered valid, but basically no such thing as machine generated JSON integers with leading zeroes. Until this is disproven, this is the fastest way to read a positive json integer, and a leading zero is decoded as a zero, and the remainder returned.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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