diff options
author | Damien George <damien.p.george@gmail.com> | 2014-01-22 15:15:36 -0800 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-01-22 15:15:36 -0800 |
commit | 60fec7a9c0d6459cff5f448fe3de61921cdd7a02 (patch) | |
tree | 07ddcc40bdc3ef0d4d5f27cd0aba545fc0a9540b /py/unicode.c | |
parent | 66db7bf69fdd94f8ff20b30698cffd111058b2bb (diff) | |
parent | 0b7184dcb8250e6654e55174753b24e4cbfea052 (diff) |
Merge pull request #208 from pfalcon/string-escapes
Implement octal and hex escapes in strings.
Diffstat (limited to 'py/unicode.c')
-rw-r--r-- | py/unicode.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/py/unicode.c b/py/unicode.c index 58c860a0e..52bc9b9f6 100644 --- a/py/unicode.c +++ b/py/unicode.c @@ -62,6 +62,10 @@ bool unichar_isdigit(unichar c) { return c < 128 && (attr[c] & FL_DIGIT) != 0; } +bool unichar_isxdigit(unichar c) { + return unichar_isdigit(c) || (c >= 'a' && c <= 'f') || (c >= 'A' && c <= 'F'); +} + /* bool char_is_alpha_or_digit(unichar c) { return c < 128 && (attr[c] & (FL_ALPHA | FL_DIGIT)) != 0; |