/[cmucl]/src/code/string.lisp
ViewVC logotype

Diff of /src/code/string.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.12.30.22 by rtoy, Tue May 26 16:25:02 2009 UTC revision 1.12.30.23 by rtoy, Wed May 27 01:06:19 2009 UTC
# Line 1006  Line 1006 
1006  #+unicode  #+unicode
1007  (defun string-to-nfc (string)  (defun string-to-nfc (string)
1008    "Convert String to Unicode Normalization Form C (NFC)."    "Convert String to Unicode Normalization Form C (NFC)."
1009    (if (normalized-form-p string :nfc)    (let ((s (copy-seq string)))
1010        (if (simple-string-p string) string (coerce string 'simple-string))      (if (normalized-form-p s :nfc)
1011        (coerce (if (normalized-form-p string :nfd)          s
1012                    (%compose (copy-seq string))          (coerce (if (normalized-form-p s :nfd)
1013                    (%compose (string-to-nfd string)))                      (%compose s)
1014                'simple-string)))                      (%compose (string-to-nfd s)))
1015                    'simple-string))))
1016    
1017  #-unicode  ;; Needed by package.lisp  #-unicode  ;; Needed by package.lisp
1018  (defun string-to-nfc (string)  (defun string-to-nfc (string)
# Line 1019  Line 1020 
1020    
1021  (defun string-to-nfkc (string)  (defun string-to-nfkc (string)
1022    "Convert String to Unicode Normalization Form KC (NFKC)."    "Convert String to Unicode Normalization Form KC (NFKC)."
1023    (if (normalized-form-p string :nfkc)    (let ((s (copy-seq string)))
1024        (if (simple-string-p string) string (coerce string 'simple-string))      (if (normalized-form-p s :nfkc)
1025        (coerce (if (normalized-form-p string :nfkd)          s
1026                    (%compose (copy-seq string))          (coerce (if (normalized-form-p s :nfkd)
1027                    (%compose (string-to-nfkd string)))                      (%compose s)
1028                'simple-string)))                      (%compose (string-to-nfkd s)))
1029                    'simple-string))))

Legend:
Removed from v.1.12.30.22  
changed lines
  Added in v.1.12.30.23

  ViewVC Help
Powered by ViewVC 1.1.5