[uim-commit] r583 - trunk/scm

yamaken at freedesktop.org yamaken at freedesktop.org
Sun Feb 6 19:09:25 PST 2005


Author: yamaken
Date: 2005-02-06 19:09:23 -0800 (Sun, 06 Feb 2005)
New Revision: 583

Modified:
   trunk/scm/util.scm
Log:
* scm/util.scm
  - (string->char): New procedure
  - (string->printable-char): Simplify with string->char


Modified: trunk/scm/util.scm
===================================================================
--- trunk/scm/util.scm	2005-02-07 02:55:52 UTC (rev 582)
+++ trunk/scm/util.scm	2005-02-07 03:09:23 UTC (rev 583)
@@ -103,11 +103,16 @@
       (print-to-string s buf))))
 
 ;; TODO: write test
+(define string->char
+  (lambda (str)
+    (and (= (string-length str)
+	    1)
+	 (string->charcode str))))
+
+;; TODO: write test
 (define string->printable-char
   (lambda (str)
-    (let ((c (and (= (string-length str)
-		     1)
-		  (string->charcode str))))
+    (let ((c (string->char str)))
       (and (char-printable? c)
 	   c))))
 



More information about the Uim-commit mailing list