From 6a3ddef2e4da9a444c4b22b41d9df71ca451aadd Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20V=C3=A1zquez?= Date: Fri, 24 May 2013 02:47:54 +0100 Subject: [PATCH] Remove char-to-string --- src/compiler.lisp | 6 ------ src/string.lisp | 5 +---- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/src/compiler.lisp b/src/compiler.lisp index c4b8f66..09d5c0a 100644 --- a/src/compiler.lisp +++ b/src/compiler.lisp @@ -1431,12 +1431,6 @@ "var x = " x ";" *newline* "return (typeof(" x ") == \"string\") && x.length == 1;"))) -(define-builtin char-to-string (x) - (js!selfcall - "var r = [" x "];" *newline* - "r.type = 'character';" - "return r")) - (define-builtin char-upcase (x) (code x ".toUpperCase()")) diff --git a/src/string.lisp b/src/string.lisp index 8fe6368..574c8b7 100644 --- a/src/string.lisp +++ b/src/string.lisp @@ -19,13 +19,10 @@ (defun make-string (n &key initial-element) (make-array n :element-type 'character :initial-element initial-element)) -;; (defun char-to-string (x) -;; (make-string 1 :initial-element x)) - (defun string (x) (cond ((stringp x) x) ((symbolp x) (symbol-name x)) - (t (char-to-string x)))) + (t (make-string 1 :initial-element x)))) (defun string= (s1 s2) (let* ((s1 (string s1)) -- 1.7.10.4