unicode-data-0.4.0.1: Access Unicode Character Database (UCD)

Copyright | (c) 2020 Composewell Technologies and Contributors
License | Apache-2.0
Maintainer | streamly@composewell.com
Stability | experimental
Safe Haskell | Safe-Inferred
Language | Haskell2010

Unicode.Char.Numeric.Compat

Contents

- Predicates

Description

Compatibility module for numeric character property related functions.

Since: 0.3.1

Synopsis

- isNumber :: Char -> Bool

# Predicates

isNumber :: Char -> Bool #

Selects Unicode numeric characters, including digits from various scripts, Roman numerals, et cetera.

This function returns `True` if its argument has one of the following `GeneralCategory`s, or `False` otherwise:

- `DecimalNumber`
- `LetterNumber`
- `OtherNumber`

Note: a character may have a numeric value (see `numericValue`) but return `False`, because `isNumber` only tests `GeneralCategory`: some CJK characters are `OtherLetter` and do have a numeric value. Use `isNumeric` to cover those cases as well.

    isNumber c == Data.Char.isNumber c

@since 0.3.1 moved to Compat module.

Since: 0.3.0