From df113f9cc4448b151ec2b53c6a17dfd9c0158489 Mon Sep 17 00:00:00 2001 From: "kr.angelov" Date: Wed, 22 Oct 2014 14:36:58 +0000 Subject: add Unicode classification routines to libgu. ported from the base package in Haskell. --- src/runtime/c/gu/ucs.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/runtime/c/gu/ucs.h') diff --git a/src/runtime/c/gu/ucs.h b/src/runtime/c/gu/ucs.h index b09e0ff3f..c976df67f 100644 --- a/src/runtime/c/gu/ucs.h +++ b/src/runtime/c/gu/ucs.h @@ -36,4 +36,20 @@ gu_str_to_ucs(const char* cbuf, size_t len, GuUCS* ubuf, GuExn* err); size_t gu_ucs_to_str(const GuUCS* ubuf, size_t len, char* cbuf, GuExn* err); +bool gu_ucs_is_upper(GuUCS c); +bool gu_ucs_is_digit(GuUCS c); +bool gu_ucs_is_alpha(GuUCS c); +bool gu_ucs_is_cntrl(GuUCS c); +bool gu_ucs_is_space(GuUCS c); +bool gu_ucs_is_print(GuUCS c); +bool gu_ucs_is_lower(GuUCS c); + +bool gu_ucs_is_alnum(GuUCS c); + +GuUCS gu_ucs_to_lower(GuUCS c); +GuUCS gu_ucs_to_upper(GuUCS c); +GuUCS gu_ucs_to_title(GuUCS c); + +int gu_ucs_is_gencat(GuUCS wc); + #endif // GU_ISO10646_H_ -- cgit v1.2.3