num

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Float64

func Float64(s *string) (d float64, err error)

func Long

func Long(s *string, base int, bitSize int) (i int64, err error)

func String

func String(i int64) string

Types

type Comparator

type Comparator[T any, O constraints.Integer | constraints.Float] interface {
	Between(min T, max T, v T, converter Converter[T, O]) (bool, error)
}

type Converter

type Converter[I any, O constraints.Integer | constraints.Float] interface {
	Convert(i I) (*O, error)
}

type GenericComparator

type GenericComparator[T any, O constraints.Integer | constraints.Float] struct{}

func (*GenericComparator[T, O]) Between

func (c *GenericComparator[T, O]) Between(min T, max T, v T, converter Converter[T, O]) (bool, error)

type StringFloat64Converter

type StringFloat64Converter struct{}

func (*StringFloat64Converter) Convert

func (c *StringFloat64Converter) Convert(s string) (*float64, error)

Jump to

Keyboard shortcuts

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