Documentation
¶
Overview ¶
Package np provides a way to query the Numeric Properties of a Unicode code point. This allows, for example, parsing the value of digits and numerals in other languages.
Index ¶
Constants ¶
View Source
const ( None = 0 Decimal = 1 // decimal-radix numeral e.g. 0-9 Digit = 2 // typographic context e.g. superscript Numeric = 3 // non-decimal e.g. Roman numerals )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Type ¶
type Type int
Type returns the type of a numeral.
- Decimal is a numeral in a decimal-radix number system, such as the ASCII digits 0-9, Devanagari digits, Arabic digits, etc.
- Digit is like Decimal, but in some typographic context, e.g. superscript, a number in a circle, etc.
- Numeric is a numeral that has a value, but does not appear in a decimal system. For example, fractions, Tamil numbers, or Roman numerals.
Click to show internal directories.
Click to hide internal directories.