u

package module
v0.0.0-...-f546e63 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2024 License: MIT Imports: 4 Imported by: 0

README

u

Introduction

u is a data structure and algorithm library for golang.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsAlnum

func IsAlnum(ch byte) bool

IsAlnum checks if ch character is alphanumeric

func IsAlpha

func IsAlpha(ch byte) bool

IsAlpha checks if ch character is alphabetic

func IsBlank

func IsBlank(ch byte) bool

IsBlank checks if ch character is blank character

func IsCntrl

func IsCntrl(ch byte) bool

IsCntrl checks if ch character is control character

func IsDigit

func IsDigit(ch byte) bool

IsDigit checks if ch character is digit

func IsGraph

func IsGraph(ch byte) bool

IsGraph checks if ch character is graphical character

func IsLower

func IsLower(ch byte) bool

IsLower checks if ch character is lowercase character

func IsPrint

func IsPrint(ch byte) bool

IsPrint checks if ch character is printing character

func IsPunct

func IsPunct(ch byte) bool

IsPunct checks if ch character is punctuation character

func IsSpace

func IsSpace(ch byte) bool

IsSpace checks if ch character is space character

func IsUpper

func IsUpper(ch byte) bool

IsUpper checks if ch character is uppercase character

func IsXdigit

func IsXdigit(ch byte) bool

IsXdigit checks if ch character is hexadecimal character

func ToLower

func ToLower(ch byte) byte

ToLower converts a character to lowercase

func ToUpper

func ToUpper(ch byte) byte

ToUpper converts a character to uppercase

Types

type Avl

type Avl[K, V any] struct {
	// contains filtered or unexported fields
}

func NewAvl

func NewAvl[K, V any](cmp func(K, K) int) *Avl[K, V]

func (*Avl[K, V]) At

func (mod *Avl[K, V]) At(key K) V

func (*Avl[K, V]) Clear

func (mod *Avl[K, V]) Clear()

func (*Avl[K, V]) Copy

func (mod *Avl[K, V]) Copy() *Avl[K, V]

func (*Avl[K, V]) Filter

func (mod *Avl[K, V]) Filter(fn func(key K, val V) bool) *Avl[K, V]

func (*Avl[K, V]) IsAll

func (mod *Avl[K, V]) IsAll(fn func(key K, val V) bool) bool

func (*Avl[K, V]) IsAny

func (mod *Avl[K, V]) IsAny(fn func(key K, val V) bool) bool

func (*Avl[K, V]) IsEmpty

func (mod *Avl[K, V]) IsEmpty() bool

func (*Avl[K, V]) IsExist

func (mod *Avl[K, V]) IsExist(key K) bool

func (*Avl[K, V]) Len

func (mod *Avl[K, V]) Len() int

func (*Avl[K, V]) Map

func (mod *Avl[K, V]) Map(fn func(key K, val V) V) *Avl[K, V]

func (*Avl[K, V]) Next

func (mod *Avl[K, V]) Next(key K) V

func (*Avl[K, V]) Pop

func (mod *Avl[K, V]) Pop(key K) V

func (*Avl[K, V]) Prev

func (mod *Avl[K, V]) Prev(key K) V

func (*Avl[K, V]) Put

func (mod *Avl[K, V]) Put(key K, val V)

func (*Avl[K, V]) Range

func (mod *Avl[K, V]) Range(order bool) iter.Seq2[K, V]

func (*Avl[K, V]) Re

func (mod *Avl[K, V]) Re(key K, val V)

func (*Avl[K, V]) String

func (mod *Avl[K, V]) String() string

type Map

type Map[K comparable, V any] struct {
	// contains filtered or unexported fields
}

func NewMap

func NewMap[K comparable, V any](other map[K]V) *Map[K, V]

func (*Map[K, V]) At

func (mod *Map[K, V]) At(key K) V

func (*Map[K, V]) Clear

func (mod *Map[K, V]) Clear()

func (*Map[K, V]) Copy

func (mod *Map[K, V]) Copy() *Map[K, V]

func (*Map[K, V]) Filter

func (mod *Map[K, V]) Filter(fn func(key K, val V) bool) *Map[K, V]

func (*Map[K, V]) IsAll

func (mod *Map[K, V]) IsAll(fn func(key K, val V) bool) bool

func (*Map[K, V]) IsAny

func (mod *Map[K, V]) IsAny(fn func(key K, val V) bool) bool

func (*Map[K, V]) IsEmpty

func (mod *Map[K, V]) IsEmpty() bool

func (*Map[K, V]) IsExist

func (mod *Map[K, V]) IsExist(key K) bool

func (*Map[K, V]) Keys

func (mod *Map[K, V]) Keys() *Vec[K]

func (*Map[K, V]) Len

func (mod *Map[K, V]) Len() int

func (*Map[K, V]) Map

func (mod *Map[K, V]) Map(fn func(key K, val V) V) *Map[K, V]

func (*Map[K, V]) Pop

func (mod *Map[K, V]) Pop(key K) V

func (*Map[K, V]) Put

func (mod *Map[K, V]) Put(key K, val V)

func (*Map[K, V]) Range

func (mod *Map[K, V]) Range() iter.Seq2[K, V]

func (*Map[K, V]) Re

func (mod *Map[K, V]) Re(key K, val V)

func (*Map[K, V]) String

func (mod *Map[K, V]) String() string

func (*Map[K, V]) Vals

func (mod *Map[K, V]) Vals() *Vec[V]

type Vec

type Vec[T any] struct {
	// contains filtered or unexported fields
}

func NewVec

func NewVec[T any](cmp func(T, T) int, other ...T) *Vec[T]

func (*Vec[T]) At

func (mod *Vec[T]) At(idx int) T

func (*Vec[T]) AtBack

func (mod *Vec[T]) AtBack() T

func (*Vec[T]) AtFront

func (mod *Vec[T]) AtFront() T

func (*Vec[T]) Clear

func (mod *Vec[T]) Clear()

func (*Vec[T]) Copy

func (mod *Vec[T]) Copy() *Vec[T]

func (*Vec[T]) Filter

func (mod *Vec[T]) Filter(fn func(idx int, it T) bool) *Vec[T]

func (*Vec[T]) Find

func (mod *Vec[T]) Find(it T) (int, T)

func (*Vec[T]) FindBy

func (mod *Vec[T]) FindBy(fn func(idx int, it T) bool) (int, T)

func (*Vec[T]) Index

func (mod *Vec[T]) Index(it T) int

func (*Vec[T]) IndexBy

func (mod *Vec[T]) IndexBy(fn func(it T) bool) int

func (*Vec[T]) IsAll

func (mod *Vec[T]) IsAll(fn func(idx int, it T) bool) bool

func (*Vec[T]) IsAny

func (mod *Vec[T]) IsAny(fn func(idx int, it T) bool) bool

func (*Vec[T]) IsEmpty

func (mod *Vec[T]) IsEmpty() bool

func (*Vec[T]) IsSorted

func (mod *Vec[T]) IsSorted() bool

func (*Vec[T]) IsSortedBy

func (mod *Vec[T]) IsSortedBy(fn func(a, b T) int) bool

func (*Vec[T]) Items

func (mod *Vec[T]) Items() []T

func (*Vec[T]) Len

func (mod *Vec[T]) Len() int

func (*Vec[T]) Map

func (mod *Vec[T]) Map(fn func(idx int, it T) T) *Vec[T]

func (*Vec[T]) Max

func (mod *Vec[T]) Max() T

func (*Vec[T]) MaxBy

func (mod *Vec[T]) MaxBy(fn func(a, b T) int) T

func (*Vec[T]) Min

func (mod *Vec[T]) Min() T

func (*Vec[T]) MinBy

func (mod *Vec[T]) MinBy(fn func(a, b T) int) T

func (*Vec[T]) Pop

func (mod *Vec[T]) Pop(idx int) T

func (*Vec[T]) PopBack

func (mod *Vec[T]) PopBack() T

func (*Vec[T]) PopFront

func (mod *Vec[T]) PopFront() T

func (*Vec[T]) Put

func (mod *Vec[T]) Put(idx int, it T)

func (*Vec[T]) PutBack

func (mod *Vec[T]) PutBack(it T)

func (*Vec[T]) PutFront

func (mod *Vec[T]) PutFront(it T)

func (*Vec[T]) Range

func (mod *Vec[T]) Range(order bool) iter.Seq2[int, T]

func (*Vec[T]) Re

func (mod *Vec[T]) Re(idx int, it T)

func (*Vec[T]) ReBack

func (mod *Vec[T]) ReBack(it T)

func (*Vec[T]) ReFront

func (mod *Vec[T]) ReFront(it T)

func (*Vec[T]) Sort

func (mod *Vec[T]) Sort()

func (*Vec[T]) SortBy

func (mod *Vec[T]) SortBy(fn func(a, b T) int)

func (*Vec[T]) String

func (mod *Vec[T]) String() string

Jump to

Keyboard shortcuts

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