aboutsummaryrefslogtreecommitdiff
path: root/lib/unicode/prop/uprop_is_nchar.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/unicode/prop/uprop_is_nchar.c')
-rw-r--r--lib/unicode/prop/uprop_is_nchar.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/unicode/prop/uprop_is_nchar.c b/lib/unicode/prop/uprop_is_nchar.c
new file mode 100644
index 0000000..7022d2e
--- /dev/null
+++ b/lib/unicode/prop/uprop_is_nchar.c
@@ -0,0 +1,10 @@
+#include "rune.h"
+#include "unicode/prop.h"
+
+bool
+rprop_is_nchar(rune ch)
+{
+ return (ch >= 0xFDD0 && ch <= 0xFDEF)
+ || ((ch & 0xFFFE) == 0xFFFE
+ && (ch & RUNE_C(0xFF0000)) <= RUNE_C(0x0F0000));
+}