helpers

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EqualStringIgnoreCaseASCII

func EqualStringIgnoreCaseASCII(s, prefix string) bool

func Equals

func Equals(in []rune, start int, length int, find []rune) bool

func EqualsIgnoreCase

func EqualsIgnoreCase(in []rune, start int, length int, find []rune) bool

func IndexFunc

func IndexFunc(in []rune, f func(ch rune) bool) int

func IndexOf

func IndexOf(in []rune, find []rune) int

func IndexOfAny

func IndexOfAny(in []rune, find []rune) int

func IndexOfAny1

func IndexOfAny1(in []rune, find rune) int

func IndexOfAny2

func IndexOfAny2(in []rune, find1, find2 rune) int

func IndexOfAny3

func IndexOfAny3(in []rune, find1, find2, find3 rune) int

func IndexOfAnyExcept

func IndexOfAnyExcept(in []rune, bad []rune) int

func IndexOfAnyExcept1

func IndexOfAnyExcept1(in []rune, bad rune) int

func IndexOfAnyExcept2

func IndexOfAnyExcept2(in []rune, bad1, bad2 rune) int

func IndexOfAnyExcept3

func IndexOfAnyExcept3(in []rune, bad1, bad2, bad3 rune) int

func IndexOfAnyExceptInRange

func IndexOfAnyExceptInRange(in []rune, first, last rune) int

func IndexOfAnyExceptInSet

func IndexOfAnyExceptInSet(in []rune, set syntax.CharSet) int

func IndexOfAnyInRange

func IndexOfAnyInRange(in []rune, first, last rune) int

func IndexOfIgnoreCase

func IndexOfIgnoreCase(in []rune, find []rune) int

find should always be sent in lower-case

func IndexOfIgnoreCaseAscii

func IndexOfIgnoreCaseAscii(in []rune, find []rune) int

func IndexStringIgnoreCaseASCII

func IndexStringIgnoreCaseASCII(s, prefix string) int

func IsBetween

func IsBetween(val rune, first, last rune) bool

func IsInASCIIBitmap

func IsInASCIIBitmap(ch rune, lo uint64, hi uint64) bool

func IsInMask32

func IsInMask32(ch rune, mask uint32) bool

func IsInMask64

func IsInMask64(ch rune, mask uint64) bool

func IsWordChar

func IsWordChar(r rune) bool

According to UTS#18 Unicode Regular Expressions (http://www.unicode.org/reports/tr18/) RL 1.4 Simple Word Boundaries The class of <word_character> includes all Alphabetic values from the Unicode character database, from UnicodeData.txt [UData], plus the U+200C ZERO WIDTH NON-JOINER and U+200D ZERO WIDTH JOINER.

func LastIndexOf

func LastIndexOf(in []rune, find []rune) int

func LastIndexOfAny1

func LastIndexOfAny1(in []rune, find rune) int

func LastIndexOfAnyExcept1

func LastIndexOfAnyExcept1(in []rune, not rune) int

func LastIndexOfAnyInRange

func LastIndexOfAnyInRange(in []rune, first, last rune) int

func Max

func Max(a, b int) int

func Min

func Min(a, b int) int

func StartsWith

func StartsWith(in []rune, find []rune) bool

func StartsWithIgnoreCase

func StartsWithIgnoreCase(in []rune, find []rune) bool

find should always be sent in lower-case

Types

type AsciiSearchValues

type AsciiSearchValues struct {
	// contains filtered or unexported fields
}

func NewAsciiSearchValues

func NewAsciiSearchValues(vals string) AsciiSearchValues

func (AsciiSearchValues) IndexOfAny

func (s AsciiSearchValues) IndexOfAny(chars []rune) int

return the first index of our original vals values within the slice given

func (AsciiSearchValues) IndexOfAnyExcept

func (s AsciiSearchValues) IndexOfAnyExcept(chars []rune) int

return the first index of anything except our original vals values within the slice given

func (AsciiSearchValues) LastIndexOfAny

func (s AsciiSearchValues) LastIndexOfAny(chars []rune) int

return the last index of our original vals values within the slice given

func (AsciiSearchValues) LastIndexOfAnyExcept

func (s AsciiSearchValues) LastIndexOfAnyExcept(chars []rune) int

return the last index of our original vals values within the slice given

type RuneSearchValues

type RuneSearchValues struct {
	// contains filtered or unexported fields
}

func NewRuneSearchValues

func NewRuneSearchValues(vals string) RuneSearchValues

func (RuneSearchValues) IndexOfAny

func (s RuneSearchValues) IndexOfAny(chars []rune) int

return the first index of our original vals values within the slice given

func (RuneSearchValues) IndexOfAnyExcept

func (s RuneSearchValues) IndexOfAnyExcept(chars []rune) int

return the first index of our original vals values within the slice given

func (RuneSearchValues) LastIndexOfAny

func (s RuneSearchValues) LastIndexOfAny(chars []rune) int

return the last index of our original vals values within the slice given

func (RuneSearchValues) LastIndexOfAnyExcept

func (s RuneSearchValues) LastIndexOfAnyExcept(chars []rune) int

return the last index of our original vals values within the slice given

type StringSearchValues

type StringSearchValues struct {
	// contains filtered or unexported fields
}

func NewStringSearchValues

func NewStringSearchValues(vals [][]rune, ignoreCase bool) StringSearchValues

func (StringSearchValues) IndexOfAny

func (s StringSearchValues) IndexOfAny(in []rune) int

func (StringSearchValues) StartsWith

func (s StringSearchValues) StartsWith(chars []rune) int

func (StringSearchValues) StartsWithIgnoreCase

func (s StringSearchValues) StartsWithIgnoreCase(chars []rune) int

Jump to

Keyboard shortcuts

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