slices

package
v0.4.3-0...-af5a74a Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2020 License: AGPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetItem

func GetItem(slice []uint8, index int) (uint8, bool)

GetItem retrieves an item from a slice at given position. The second return value indicates whether a the given index existed in the slice or not.

func PrefilledSlice

func PrefilledSlice(value, length int) []int

PrefilledSlice creates a slice of given length and prefills it with the given value.

func RemoveItem

func RemoveItem(slice []int, index int) []int

RemoveItem removes an item from a slice by modifying the existing slice.

func SetItem

func SetItem(slice []uint8, index int, value uint8) []uint8

SetItem writes an item to a slice at given position overwriting an existing value. If the index is out of range it is be appended.

Types

This section is empty.

Jump to

Keyboard shortcuts

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