package bytes

import "git.sr.ht/~shulhan/pakakeh.go/internal/bytes"

Package bytes is the internal, shared functions for manipulating bytes, created to prevent import cycle.

Index

Functions

func TokenFind

func TokenFind(text, token []byte, startat int) (at int)

TokenFind return the first index of matched token in text, start at custom index. If "startat" parameter is less than 0, then it will be set to 0. If token is empty or no token found it will return -1.

Source Files

bytes.go

Version
v0.60.0 (latest)
Published
Feb 1, 2025
Platform
linux/amd64
Last checked
1 hour ago

Tools for package owners.