summaryrefslogtreecommitdiff
path: root/libguile/i18n.h
diff options
context:
space:
mode:
authorJulian Graham <julian.graham@aya.yale.edu>2009-12-22 00:19:56 -0500
committerJulian Graham <julian.graham@aya.yale.edu>2009-12-22 00:19:56 -0500
commit820f33aaed18b37f68bc4abfeea52df2df3bd374 (patch)
treec61e725f485b3a1bd85ca3192e4642ad7b31eb7f /libguile/i18n.h
parent9b5a0d84600b3c86425bba5ea2324334a7ba873d (diff)
downloadguile-820f33aaed18b37f68bc4abfeea52df2df3bd374.tar.gz
Improved support for Unicode title case in Guile's string and character APIs.
* doc/ref/api-data.texi (Characters): Documentation for `char-titlecase'. * doc/ref/api-i18n.texi (Character Case Mapping): Documentation for `char-locale-titlecase' and `string-locale-titlecase'. * libguile/chars.c, libguile/chars.h (scm_char_titlecase, scm_c_titlecase): New functions. * libguile/i18n.c, libguile/i18n.h (chr_to_case, scm_char_locale_titlecase, str_to_case, scm_string_locale_titlecase): New functions. * libguile/i18n.c (scm_char_locale_downcase, scm_char_locale_upcase, scm_string_locale_downcase, scm_string_locale_upcase): Refactor to share code via chr_to_case and str_to_case, as appropriate. * module/ice-9/i18n.scm (char-locale-title-case, string-locale-titlecase): New functions. * libguile/srfi-13.c (string_titlecase_x): Use uc_totitle instead of uc_toupper. * test-suite/tests/chars.test: Tests for `char-titlecase'. * test-suite/tests/i18n.test: Tests for `char-locale-titlecase' and `string-locale-titlecase'. * test-suite/tests/srfi-13.test: Tests for `string-titlecase'.
Diffstat (limited to 'libguile/i18n.h')
-rw-r--r--libguile/i18n.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/libguile/i18n.h b/libguile/i18n.h
index 16045eb0c..c2792aca0 100644
--- a/libguile/i18n.h
+++ b/libguile/i18n.h
@@ -38,8 +38,10 @@ SCM_API SCM scm_char_locale_ci_gt (SCM c1, SCM c2, SCM locale);
SCM_API SCM scm_char_locale_ci_eq (SCM c1, SCM c2, SCM locale);
SCM_API SCM scm_char_locale_upcase (SCM chr, SCM locale);
SCM_API SCM scm_char_locale_downcase (SCM chr, SCM locale);
+SCM_API SCM scm_char_locale_titlecase (SCM chr, SCM locale);
SCM_API SCM scm_string_locale_upcase (SCM chr, SCM locale);
SCM_API SCM scm_string_locale_downcase (SCM chr, SCM locale);
+SCM_API SCM scm_string_locale_titlecase (SCM chr, SCM locale);
SCM_API SCM scm_locale_string_to_integer (SCM str, SCM base, SCM locale);
SCM_API SCM scm_locale_string_to_inexact (SCM str, SCM locale);