From 4d783841dbed026f90e9510032c169d12dafa771 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sat, 18 Mar 2017 17:08:31 -0700 Subject: [PATCH] Use ucd-X-value directly in ustring. --- src/runtime/runtime.pkg | 11 ++++++----- src/runtime/ustring.scm | 10 +++++----- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/runtime/runtime.pkg b/src/runtime/runtime.pkg index 2792eb329..0cb362bca 100644 --- a/src/runtime/runtime.pkg +++ b/src/runtime/runtime.pkg @@ -1280,11 +1280,6 @@ USA. char-set:lower-case char-set:upper-case char-set:whitespace) - (export (runtime) - (char-downcase-full ucd-lc-value) - (char-foldcase-full ucd-cf-value) - (char-titlecase-full ucd-tc-value) - (char-upcase-full ucd-uc-value)) (export (runtime character) ucd-gc-value ucd-nt-value @@ -1292,6 +1287,8 @@ USA. ucd-scf-value ucd-slc-value ucd-suc-value) + (export (runtime parser) + (char-foldcase-full ucd-cf-value)) (export (runtime ucd-glue) char-set:changes-when-case-folded ucd-nt-value) @@ -1301,8 +1298,12 @@ USA. char-changes-when-upper-cased? char-nfd-quick-check? ucd-ccc-value + ucd-cf-value ucd-dm-value ucd-gcb-value + ucd-lc-value + ucd-tc-value + ucd-uc-value ucd-wb-value)) (define-package (runtime ucd-glue) diff --git a/src/runtime/ustring.scm b/src/runtime/ustring.scm index 8ed272258..1aaac2170 100644 --- a/src/runtime/ustring.scm +++ b/src/runtime/ustring.scm @@ -436,13 +436,13 @@ USA. ;;;; Case (define (string-downcase string) - (case-transform char-downcase-full string)) + (case-transform ucd-lc-value string)) (define (string-foldcase string) - (case-transform char-foldcase-full string)) + (case-transform ucd-cf-value string)) (define (string-upcase string) - (case-transform char-upcase-full string)) + (case-transform ucd-uc-value string)) (define (case-transform transform string) (let ((builder (string-builder)) @@ -466,10 +466,10 @@ USA. (let ((char (string-ref string index))) (if (char-cased? char) (begin - (builder (char-titlecase-full char)) + (builder (ucd-tc-value char)) (do ((index (fix:+ index 1) (fix:+ index 1))) ((not (fix:< index end))) - (builder (char-downcase-full (string-ref string index))))) + (builder (ucd-lc-value (string-ref string index))))) (begin (builder char) (loop (fix:+ index 1)))))))) -- 2.25.1