3 ;; JSCL is free software: you can redistribute it and/or
4 ;; modify it under the terms of the GNU General Public License as
5 ;; published by the Free Software Foundation, either version 3 of the
6 ;; License, or (at your option) any later version.
8 ;; JSCL is distributed in the hope that it will be useful, but
9 ;; WITHOUT ANY WARRANTY; without even the implied warranty of
10 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 ;; General Public License for more details.
13 ;; You should have received a copy of the GNU General Public License
14 ;; along with JSCL. If not, see <http://www.gnu.org/licenses/>.
18 ((symbolp x) (symbol-name x))
19 (t (char-to-string x))))
21 (defun string= (s1 s2)
22 (let ((n (length s1)))
23 (when (= (length s2) n)
25 (unless (char= (char s1 i) (char s2 i))
26 (return-from string= nil))))))
28 (define-setf-expander char (string index)
29 (let ((g!string (gensym))
32 (values (list g!string g!index)
35 `(aset ,g!string ,g!index ,g!value)
36 `(char ,g!string ,g!index))))