writer

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2022 License: Apache-2.0 Imports: 0 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IntLength

func IntLength(i int) int

IntLength determines the number of digits in a base 10 integer.

func IntsLength

func IntsLength(is []int) int

IntsLength determines the number of digits in a list of base 10 integers, accounting for separators between each integer.

func WriteInteger

func WriteInteger(dst []byte, value, idx int) int

WriteInteger writes a base 10 integer to a buffer at a given index.

NB: based on fmt.Printf handling of integers, specifically base 10 case.

func WriteIntegers

func WriteIntegers(dst []byte, values []int, sep byte, idx int) int

WriteIntegers writes a slice of base 10 integer to a buffer at a given index, separating each value with the given separator, returning the index at which the write ends.

NB: Ensure that there is sufficient space in the buffer to hold values and separators.

Types

This section is empty.

Jump to

Keyboard shortcuts

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