summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2011-03-25 23:34:32 +0100
committerBruno Haible <bruno@clisp.org>2011-03-25 23:34:32 +0100
commit213475ab1f293526d4b4d1a90607f2e3425fa7e7 (patch)
tree1c673862f8ed0a8fe03d85b04f0ea20851cafa74
parent29266dd821b4e67ec31a89d65a81ef57e83b8770 (diff)
downloadlibunistring-213475ab1f293526d4b4d1a90607f2e3425fa7e7.tar.gz
Support long names of general category values.
-rw-r--r--ChangeLog7
-rw-r--r--NEWS6
-rw-r--r--doc/unictype.texi13
3 files changed, 24 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 8ac973c..56796eb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2011-03-25 Bruno Haible <bruno@clisp.org>
+ Support long names of general category values.
+ * doc/unictype.texi (Object oriented API): Document
+ uc_general_category_long_name. Mention that uc_general_category_byname
+ recognizes long names.
+
+2011-03-25 Bruno Haible <bruno@clisp.org>
+
Add support for general category group LC.
* doc/unictype.texi (Object oriented API): Mention UC_CATEGORY_LC,
UC_CASED_LETTER.
diff --git a/NEWS b/NEWS
index 3fa6437..68ed9f3 100644
--- a/NEWS
+++ b/NEWS
@@ -29,6 +29,12 @@ New in 0.9.4:
uc_bidi_category -> uc_bidi_class
uc_is_bidi_category -> uc_is_bidi_class
The old function names still exist, but are obsolete.
+* In the include file unictype.h, functions for returning long names of
+ property values have been added:
+ uc_general_category_long_name
+ The functions
+ uc_general_category_byname
+ have been extended to recognize long names as well as short names.
* It is now easier to detect the subminor version: The value of the variable
_libunistring_version and of the macro _LIBUNISTRING_VERSION now includes
also the subminor version.
diff --git a/doc/unictype.texi b/doc/unictype.texi
index c15ef05..83f9915 100644
--- a/doc/unictype.texi
+++ b/doc/unictype.texi
@@ -287,13 +287,22 @@ viewing the categories as sets of characters.
The following functions associate general categories with their name.
@deftypefun {const char *} uc_general_category_name (uc_general_category_t @var{category})
-Returns the name of a general category.
+Returns the name of a general category, more precisely, the abbreviated name.
+Returns NULL if the general category corresponds to a bit mask that does not
+have a name.
+@end deftypefun
+
+@deftypefun {const char *} uc_general_category_long_name (uc_general_category_t @var{category})
+Returns the long name of a general category.
Returns NULL if the general category corresponds to a bit mask that does not
have a name.
@end deftypefun
@deftypefun uc_general_category_t uc_general_category_byname (const char *@var{category_name})
-Returns the general category given by name, e.g@. @code{"Lu"}.
+Returns the general category given by name, e.g@. @code{"Lu"}, or by long
+name, e.g@. @code{"Uppercase Letter"}.
+This lookup ignores spaces, underscores, or hyphens as word separators and is
+case-insignificant.
@end deftypefun
The following functions view general categories as sets of Unicode characters.