bytekit

package
v0.318.0 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func IterChar

func IterChar[Data ~[]byte, Char any](d Data, next func([]byte) (char Char, length int)) iter.Seq[Char]
Example (Utf8)
package main

import (
	"fmt"
	"unicode/utf8"

	"go.llib.dev/frameless/pkg/bytekit"
)

func main() {
	var data []byte

	for char := range bytekit.IterChar(data, utf8.DecodeRune) {
		fmt.Print(char)
	}
}

func IterUTF8

func IterUTF8[Data ~[]byte](d Data) iter.Seq[rune]
Example
package main

import (
	"go.llib.dev/frameless/pkg/bytekit"
)

func main() {
	var data []byte

	for char := range bytekit.IterUTF8(data) {
		_ = char
	}
}

Types

This section is empty.

Jump to

Keyboard shortcuts

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