util

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EMPTY_STACK = "Empty Stack"
)

Variables

View Source
var ErrorEodOfStack = errors.New("end of stack")
View Source
var RegStringWithVariable regexp.Regexp = *regexp.MustCompile(`\$\{([a-zA-Z\_]+\w*?)\}`)

Functions

func IsNumberStartingCharacter

func IsNumberStartingCharacter(b byte) bool

func IsSpaces

func IsSpaces(b byte) bool

Types

type Stack

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

func NewStack

func NewStack[T any]() *Stack[T]

func (*Stack[T]) GetSlice

func (s *Stack[T]) GetSlice() []T

func (*Stack[T]) Length

func (s *Stack[T]) Length() int

func (*Stack[T]) Peek

func (s *Stack[T]) Peek() (T, error)

func (*Stack[T]) Pop

func (s *Stack[T]) Pop() (T, error)

func (*Stack[T]) Push

func (s *Stack[T]) Push(v T)

func (*Stack[T]) PushElements

func (s *Stack[T]) PushElements(v []T)

Jump to

Keyboard shortcuts

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