package mem

import "github.com/segmentio/asm/mem"

Index

Functions

func Blend

func Blend(dst, src []byte) int

Blend performs a OR of src and dst into dst, returning the number of bytes written to dst.

func ContainsByte

func ContainsByte(haystack []byte, needle byte) bool

func Copy

func Copy(dst, src []byte) int

func CountPair

func CountPair(b []byte, n int) int

CountPair returns the byte index of the first pair of two equal elements of size n.

If no pairs of equal elements were found, len(b) is returned.

func IndexPair

func IndexPair(b []byte, n int) int

IndexPair returns the byte index of the first pair of two equal elements of size n.

If no pairs of equal elements were found, -1 is returned.

func Mask

func Mask(dst, src []byte) int

Mask performs a AND of src and dst into dst, returning the number of bytes written to dst.

Source Files

blend.go blend_default.go contains.go contains_default.go copy.go copy_default.go count_pair.go count_pair_default.go index_pair.go index_pair_default.go mask.go mask_default.go mem.go

Version
v1.1.0
Published
Oct 15, 2021
Platform
js/wasm
Imports
2 packages
Last checked
1 second ago

Tools for package owners.