zint

package
v0.0.0-...-ceef0ae Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: BSD-3-Clause Imports: 7 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SizeOfInt = int(unsafe.Sizeof(dummy))

SizeOfInt is the size of an int type

Functions

func Abs

func Abs(a int) int

func Abs64

func Abs64(i int64) int64

func AddToSet64

func AddToSet64(n int64, slice *[]int64) bool

func Clamp

func Clamp(a, min, max int) int

func FromBool

func FromBool(b bool) int

func GetAny

func GetAny(i any) (int64, error)

func HashTo32

func HashTo32(str string) int32

func HashTo64

func HashTo64(str string) int64

func IndexInSlice64

func IndexInSlice64(n int64, slice []int64) int

func Intersection64

func Intersection64(a, b []int64) []int64

func IsInSlice32

func IsInSlice32(n int32, slice []int32) bool

func Join64

func Join64(ids []int64, sep string) (str string)

func MapBoolToSlice

func MapBoolToSlice(m map[int]bool) (slice []int)

func MapBoolToSlice64

func MapBoolToSlice64(m map[int64]bool) (slice []int64)

func Max

func Max(a, b int) int

func Max64

func Max64(a int64, b int64) int64

func Maximize

func Maximize(a *int, b int) bool

func Maximize64

func Maximize64(a *int64, b int64) bool

func Min

func Min(a, b int) int

func MinMax

func MinMax(a, b int) (min, max int)

func Minimize

func Minimize(a *int, b int) bool

func Minimize64

func Minimize64(a *int64, b int64) bool

func RemoveFromSet64

func RemoveFromSet64(n int64, set *[]int64) bool

func SetAny

func SetAny(numPtr any, i int64) error

func Slice64Contains

func Slice64Contains(slice []int64, i int64) bool

func SplitStringTo64

func SplitStringTo64(str string, sep string) (ints []int64)

func StringsTo64

func StringsTo64(snums []string) (ints []int64)

func SubtractedSets64

func SubtractedSets64(set []int64, subtract []int64) []int64

func ToStrings64

func ToStrings64(ints []int64) (s []string)

Types

type Range

type Range struct {
	Min int
	Max int
}

type Slice

type Slice []int

func (Slice) Count

func (s Slice) Count() int

func (Slice) GetItem

func (s Slice) GetItem(i int) (id, name string, value any)

GetItem makes Slice worth with MenuView MenuItems interface

func (Slice) Minimum

func (s Slice) Minimum() int

Jump to

Keyboard shortcuts

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