Documentation
¶
Overview ¶
Package conv contains basic data type conversion functions
Index ¶
- func AnyToString[T any](item T) string
- func AnyToStringList[T any](items []T) []string
- func BoolToInt(b bool) int
- func BoolToString(b bool) string
- func BoolToUint(b bool) uint
- func FloatToInt[F number.Float](f F) int
- func FloatToString[F number.Float](f F) string
- func FloatToUint[F number.Float](f F) uint
- func IntToBool[I number.Integer](i I) bool
- func IntToFloat[I number.Integer](i I) float64
- func IntToString[I number.Integer](i I) string
- func IntToUint[I number.Int](i I) uint
- func NotFn[T any](fn func(T) bool) func(T) bool
- func UintToInt[I number.Uint](i I) int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnyToStringList ¶
AnyToStringList converts each item to a string
func BoolToUint ¶
BoolToUint converts bool to uint (true = 1, false = 0)
func FloatToString ¶
FloatToString converts a Float to string
func FloatToUint ¶
FloatToUint converts a Float to uint, clips to 0 if negative float
func IntToFloat ¶
IntToFloat converts an Integer to float64
func IntToString ¶
IntToString converts an Integer to string
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.