utils

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	W_NONE    wordType = iota
	W_NUM_SCI wordType = iota
	W_NUM_DEC wordType = iota
	W_NUM_HEX wordType = iota
	W_NUM_BIN wordType = iota
	W_UNIT    wordType = iota
	W_OP      wordType = iota
	W_CTL     wordType = iota
	W_FUNC    wordType = iota
	W_STR     wordType = iota
)

Word types

Variables

This section is empty.

Functions

func FromByteArray added in v1.2.1

func FromByteArray[T any](b []byte) (s T)

func ToBool

func ToBool(i interface{}) bool

func ToByteArray added in v1.2.1

func ToByteArray[T any](s T) (b []byte)

func ToNumber

func ToNumber[T number](i interface{}) T

func WordsEqual added in v1.1.0

func WordsEqual(a, b []Word) bool

Types

type Word added in v1.1.0

type Word struct {
	Type    wordType
	Literal string
}

func ParsePrompt added in v1.1.1

func ParsePrompt(str string) []Word

Jump to

Keyboard shortcuts

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