Add procedure is_decimal

This adds the function `is_decimal` to `core/unicode`
This commit is contained in:
StudebakerGuy
2026-03-07 18:18:47 -05:00
committed by Jeroen van Rijn
parent 263bc8cc7e
commit e5b1f1bf94

View File

@@ -131,6 +131,20 @@ is_title :: proc(r: rune) -> bool {
return is_upper(r) && is_lower(r)
}
/*
Returns true if the rune `r` is in the General Category Nd
Inputs:
- r: The run to check if it is in the general category Nd.
Returns:
`true` if the rune is in the general category Nd and `false` otherwise
*/
is_decimal :: proc(r: rune) -> bool {
return in_range(r, nd_ranges)
}
/*
This function determincs if a rune is a digit. To be a digit the
charage either has a Numeric_Type of Digit or Decimal.