projects
/
jscl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use two different string-escape functions
[jscl.git]
/
src
/
string.lisp
diff --git
a/src/string.lisp
b/src/string.lisp
index
9c547ef
..
8bead9b
100644
(file)
--- a/
src/string.lisp
+++ b/
src/string.lisp
@@
-19,7
+19,9
@@
(t (char-to-string x))))
(defun string= (s1 s2)
(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))
(when (= (length s2) n)
(dotimes (i n t)
(unless (char= (char s1 i) (char s2 i))
@@
-36,6
+38,9
@@
(when (and (= i (1- len-1)) (> len-2 len-1))
(return-from string< (1+ i))))))))
(when (and (= i (1- len-1)) (> len-2 len-1))
(return-from string< (1+ i))))))))
+(defun stringp (s)
+ (stringp s))
+
(define-setf-expander char (string index)
(let ((g!string (gensym))
(g!index (gensym))
(define-setf-expander char (string index)
(let ((g!string (gensym))
(g!index (gensym))