MCPcopy Create free account
hub / github.com/apache/arrow / IsDigitCharacterUnicode

Function IsDigitCharacterUnicode

cpp/src/arrow/compute/kernels/scalar_string_utf8.cc:141–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139}
140
141static inline bool IsDigitCharacterUnicode(uint32_t codepoint) {
142 // Approximates Python's str.isnumeric():
143 // returns true for Nd and No (e.g., '٣', '³'), but excludes Nl like Roman numerals
144 // ('Ⅷ') due to utf8proc limits.
145 // '¾' (vulgar fraction) is treated as a digit by utf8proc 'No'
146 return HasAnyUnicodeGeneralCategory(codepoint, UTF8PROC_CATEGORY_ND,
147 UTF8PROC_CATEGORY_NO);
148}
149
150static inline bool IsNumericCharacterUnicode(uint32_t codepoint) {
151 // Formally this is not correct, but utf8proc does not allow us to query for Numerical

Callers 1

PredicateCharacterAllMethod · 0.85

Calls 1

Tested by

no test coverage detected