X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fstring.lisp;h=411c638be89569d6e9c3e2eeeab4423800761f2b;hb=b2de12c4e1a6e77e7f3f22d056adcfeda79d085b;hp=7026cb34087e11f8ad90e3e7a2f983149ebe6d00;hpb=9d3e2d64fff21ebc844ab9254fa6ff798d10d634;p=jscl.git diff --git a/src/string.lisp b/src/string.lisp index 7026cb3..411c638 100644 --- a/src/string.lisp +++ b/src/string.lisp @@ -62,21 +62,10 @@ `(char ,g!string ,g!index)))) -(defun concat-two (string1 string2) - (let* ((len1 (length string1)) - (len2 (length string2)) - (string (make-array (+ len1 len2) :element-type 'character)) - (i 0)) - (dotimes (j len1) - (aset string i (char string1 j)) - (incf i)) - (dotimes (j len2) - (aset string i (char string2 j)) - (incf i)) - string)) - (defun concat (&rest strs) - (!reduce #'concat-two strs "")) + (flet ((concat-two (str1 str2) + (concatenate-storage-vector str1 str2))) + (!reduce #'concat-two strs ""))) (defun string-upcase (string)