utils

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SingleWalk added in v0.0.2

func SingleWalk[T any](e T, each func(e T, cb func(T) WalkMode) bool, cb func(e T) (mode WalkMode))

func TrimStringSpace

func TrimStringSpace(s string, starts, ends bool) (start int, _ string)

TrimStringSpace returns a slice of the string s, with all leading and trailing white space removed, as defined by Unicode.

func Walk added in v0.0.2

func Walk[T any](e T, each func(e T, cb func(T) WalkMode) bool, cb func(path []T, e T) (mode WalkMode))

Types

type WalkMode added in v0.0.2

type WalkMode uint8
const (
	WalkModeContinue WalkMode = iota
	WalkModeBreak
	WalkModeSkipSiblings
	WalkModeSkipChildren
)

Jump to

Keyboard shortcuts

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