32 #define FL_PRINT (0x01) 33 #define FL_SPACE (0x02) 34 #define FL_DIGIT (0x04) 35 #define FL_ALPHA (0x08) 36 #define FL_UPPER (0x10) 37 #define FL_LOWER (0x20) 38 #define FL_XDIGIT (0x40) 41 #define AT_PR (FL_PRINT) 42 #define AT_SP (FL_SPACE | FL_PRINT) 43 #define AT_DI (FL_DIGIT | FL_PRINT | FL_XDIGIT) 44 #define AT_AL (FL_ALPHA | FL_PRINT) 45 #define AT_UP (FL_UPPER | FL_ALPHA | FL_PRINT) 46 #define AT_LO (FL_LOWER | FL_ALPHA | FL_PRINT) 47 #define AT_UX (FL_UPPER | FL_ALPHA | FL_PRINT | FL_XDIGIT) 48 #define AT_LX (FL_LOWER | FL_ALPHA | FL_PRINT | FL_XDIGIT) 52 0, 0, 0, 0, 0, 0, 0, 0,
54 0, 0, 0, 0, 0, 0, 0, 0,
55 0, 0, 0, 0, 0, 0, 0, 0,
72 #if MICROPY_PY_BUILTINS_STR_UNICODE 76 for (
unichar mask = 0x40; ord & mask; mask >>= 1) {
80 ord = (ord << 6) | (*s++ & 0x3F);
90 #if MICROPY_PY_BUILTINS_STR_UNICODE 114 #if MICROPY_PY_BUILTINS_STR_UNICODE 116 for (
const char *top = str + len; str < top; ++str) {
181 n -= (
'A' - (
'9' + 1));
188 const byte *end = p + len;
189 for (; p < end; p++) {
204 need = (0xe5 >> ((
c >> 3) & 0x6)) & 3;
205 }
else if (
c >= 0x80) {
unichar unichar_toupper(unichar c)
bool unichar_isdigit(unichar c)
STATIC const uint8_t attr[]
bool unichar_islower(unichar c)
unichar unichar_tolower(unichar c)
bool unichar_isxdigit(unichar c)
mp_uint_t unichar_xdigit_value(unichar c)
mp_uint_t unichar_charlen(const char *str, mp_uint_t len)
bool utf8_check(const byte *p, size_t len)
mp_uint_t utf8_ptr_to_index(const byte *s, const byte *ptr)
const byte * utf8_next_char(const byte *s)
bool unichar_isident(unichar c)
#define UTF8_IS_NONASCII(ch)
bool unichar_isspace(unichar c)
bool unichar_isupper(unichar c)
unichar utf8_get_char(const byte *s)
bool unichar_isalpha(unichar c)