utils.go: new function isNumOrFract(x); it returns true if x is a float, an integer, ora a fraction

This commit is contained in:
Celestino Amoroso 2024-05-06 17:31:12 +02:00
parent 6ef468408c
commit 8b4dad1381

View File

@ -38,6 +38,10 @@ func isNumber(v any) (ok bool) {
return isFloat(v) || isInteger(v)
}
func isNumOrFract(v any) (ok bool) {
return isFloat(v) || isInteger(v) || isFraction(v)
}
func isNumberString(v any) (ok bool) {
return isString(v) || isNumber(v)
}