From: Kevin M. Rosenberg Date: Thu, 1 Jan 2004 14:31:14 +0000 (+0000) Subject: r8447: add string->list X-Git-Tag: v1.96~99 X-Git-Url: http://git.kpe.io/?p=kmrcl.git;a=commitdiff_plain;h=37c6b4baf974335c53828b760ed023f37098cf19 r8447: add string->list --- diff --git a/debian/changelog b/debian/changelog index 7a6703f..b14d492 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +cl-kmrcl (1.62-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg Thu, 1 Jan 2004 06:01:10 -0700 + cl-kmrcl (1.61-1) unstable; urgency=low * New upstream diff --git a/package.lisp b/package.lisp index bba5fb8..4170056 100644 --- a/package.lisp +++ b/package.lisp @@ -68,7 +68,8 @@ #:string-maybe-shorten #:shrink-vector #:collapse-whitespace - + #:string->list + ;; io.lisp #:indent-spaces #:indent-html-spaces diff --git a/strings.lisp b/strings.lisp index e9a73a3..8eb08f7 100644 --- a/strings.lisp +++ b/strings.lisp @@ -627,3 +627,10 @@ for characters in a string" (t (setq in-white nil) (write-char c stream))))))) + +(defun string->list (string) + (let ((eof (list nil))) + (with-input-from-string (stream string) + (do ((x (read stream nil eof) (read stream nil eof)) + (l nil (cons x l))) + ((eq x eof) (nreverse l))))))