(&self)
| 955 | |
| 956 | #[pymethod] |
| 957 | fn isdigit(&self) -> bool { |
| 958 | // python's isdigit also checks if exponents are digits, these are the unicode codepoints for exponents |
| 959 | !self.data.is_empty() |
| 960 | && self.char_all(|c| { |
| 961 | c.is_ascii_digit() |
| 962 | || matches!(c, '⁰' | '¹' | '²' | '³' | '⁴' | '⁵' | '⁶' | '⁷' | '⁸' | '⁹') |
| 963 | }) |
| 964 | } |
| 965 | |
| 966 | #[pymethod] |
| 967 | fn isdecimal(&self) -> bool { |