bytealg

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Count added in v0.8.10

func Count(b []byte, c byte) (n int)

func CountString added in v0.8.10

func CountString(s string, c byte) (n int)

func Index added in v0.8.10

func Index(a, b []byte) int

Index returns the index of the first instance of b in a, or -1 if b is not present in a. Requires 2 <= len(b) <= MaxLen.

func IndexByte

func IndexByte(b []byte, ch byte) int

func IndexByteString

func IndexByteString(s string, ch byte) int

func IndexString added in v0.8.10

func IndexString(a, b string) int

IndexString returns the index of the first instance of b in a, or -1 if b is not present in a. Requires 2 <= len(b) <= MaxLen.

func MakeNoZero added in v0.8.10

func MakeNoZero(n int) (r []byte)

MakeNoZero makes a slice of length and capacity n without zeroing the bytes. It is the caller's responsibility to ensure uninitialized bytes do not leak to the end user.

Types

This section is empty.

Jump to

Keyboard shortcuts

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