aboutsummaryrefslogtreecommitdiff
path: root/py/unicode.c
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-01-22 22:40:02 +0200
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-01-22 22:48:25 +0200
commit0b7184dcb8250e6654e55174753b24e4cbfea052 (patch)
tree75229c77857a3cd0cb7026de86d60556e9f48b03 /py/unicode.c
parent0914371faf29d2f4b7fdee8001e77847b130542b (diff)
Implement octal and hex escapes in strings.
Diffstat (limited to 'py/unicode.c')
-rw-r--r--py/unicode.c4
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;