;; You should have received a copy of the GNU General Public License
;; along with JSCL. If not, see <http://www.gnu.org/licenses/>.
+;; (defun stringp (x)
+;; (and (vectorp x) (eq (array-element-type x) 'character)))
+
(defun string (x)
(cond ((stringp x) x)
((symbolp x) (symbol-name x))
(t (char-to-string x))))
(defun string= (s1 s2)
- (let ((n (length s1)))
+ (let* ((s1 (string s1))
+ (s2 (string s2))
+ (n (length s1)))
(when (= (length s2) n)
(dotimes (i n t)
(unless (char= (char s1 i) (char s2 i))
(return-from string= nil))))))
-<<<<<<< HEAD
(defun string< (s1 s2)
(let ((len-1 (length s1))
(len-2 (length s2)))
(return-from string< i))
(when (and (= i (1- len-1)) (> len-2 len-1))
(return-from string< (1+ i))))))))
-=======
+
(defun stringp (s)
(stringp s))
->>>>>>> ee0ae303e9d3f7f99eeb3af1824b61f2616f5925
(define-setf-expander char (string index)
(let ((g!string (gensym))