Documentation
¶
Index ¶
- func ExtractFromPtr[T ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uint | ~float32 | ~float64](p *T) T
- func Join[T Number](items []T, sep string) string
- func MustParseFloat64(s string) float64
- func MustParseUint64(s string) uint64
- func ParseFloat64(s string, defVal float64) float64
- func ParseUint64(s string, defVal uint64) uint64
- func PositiveToPtr[T ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uint | ~float32 | ~float64](v T) *T
- func PositiveUint8ToUint32Ptr(v uint8) *uint32
- type Number
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractFromPtr ¶
ExtractFromPtr provides null-safe value extraction from pointer.
func Join ¶ added in v0.12.0
Join concatenates numeric values into a string with specified separator.
func MustParseFloat64 ¶ added in v0.9.0
MustParseFloat64 enforces strict float64 conversion
func MustParseUint64 ¶ added in v0.9.0
MustParseUint64 performs null-safe string to uint64 conversion
func ParseFloat64 ¶ added in v0.9.0
ParseFloat64 implements fault-tolerant float conversion
func ParseUint64 ¶ added in v0.9.0
ParseUint64 provides safe conversion with fallback value
func PositiveToPtr ¶
PositiveToPtr returns a pointer to v if it's greater than zero, otherwise returns nil.
func PositiveUint8ToUint32Ptr ¶ added in v0.9.0
PositiveUint8ToUint32Ptr converts uint8 to uint32 pointer with null-safety.
Types ¶
Click to show internal directories.
Click to hide internal directories.