Documentation ¶
Index ¶
- func AlignDown[T UI](n, alignment T) T
- func AlignUp[T UI](n, alignment T) T
- func ParseFloat[T Float](i any) (T, error)
- func ParseInteger[T Integer](i any) (T, error)
- func ParseIntegers[T Integer, V any](arr []V) (ret []T, err error)
- func ParseNumber(i any) (_ uint64, isFloat bool, _ error)
- func ParseString(str string, assumeFloat bool) (uint64, bool, error)
- func ParstFloats[T Float, V any](arr []V) (ret []T, err error)
- type Float
- type Integer
- type Number
- type Real
- type SI
- type UI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseFloat ¶
func ParseInteger ¶
func ParseIntegers ¶
func ParseNumber ¶
ParseNumber converts i to uint64 (with sign kept)
if i is a float number (indicated by return value isFloat), return IEEE 754 bits of i
func ParseString ¶ added in v0.12.0
ParseString parses a number in string, it may be a float
func ParstFloats ¶
Types ¶
type Number ¶ added in v0.12.0
type Number interface { Real | ~complex64 | ~complex128 }
Click to show internal directories.
Click to hide internal directories.