r4801: Auto commit for Debian build
authorKevin M. Rosenberg <kevin@rosenberg.net>
Sun, 4 May 2003 14:52:10 +0000 (14:52 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Sun, 4 May 2003 14:52:10 +0000 (14:52 +0000)
debian/changelog
package.lisp
seqs.lisp
strings.lisp
tests.lisp

index 0f9e7390c1076e7d5ed7233ce4ca454357717704..05f05904d713120ba6494f16b1b84cff58426e0d 100644 (file)
@@ -1,3 +1,9 @@
+cl-kmrcl (1.38-1) unstable; urgency=low
+
+  * New upstream
+
+ -- Kevin M. Rosenberg <kmr@debian.org>  Sun,  4 May 2003 08:43:14 -0600
+
 cl-kmrcl (1.37-1) unstable; urgency=low
 
   * New upstream
index 120d39bfcd20dfbec01cfff8c83b20ae85da9a9b..5f6ec8fd90768e0228180fdd0ed84ce2c9abc915 100644 (file)
@@ -7,7 +7,7 @@
 ;;;; Programmer:    Kevin M. Rosenberg
 ;;;; Date Started:  Apr 2000
 ;;;;
-;;;; $Id: package.lisp,v 1.24 2003/05/02 22:30:26 kevin Exp $
+;;;; $Id: package.lisp,v 1.25 2003/05/04 14:52:10 kevin Exp $
 ;;;;
 ;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg
 ;;;;
@@ -40,6 +40,7 @@
    #:mapcar-append-string
    #:mapcar2-append-string
    #:delimited-string-to-list
+   #:ndelimited-string-to-list
    #:list-to-delimited-string
    #:flatten
    #:indent-spaces
index 92a4aa05818cce6454f0de95de635de031b440e8..b86d5ec177f215a0a92d018831019671ec4b03e4 100644 (file)
--- a/seqs.lisp
+++ b/seqs.lisp
@@ -7,7 +7,7 @@
 ;;;; Programmer:    Kevin M. Rosenberg
 ;;;; Date Started:  Apr 2000
 ;;;;
-;;;; $Id: seqs.lisp,v 1.1 2003/04/29 00:26:21 kevin Exp $
+;;;; $Id: seqs.lisp,v 1.2 2003/05/04 14:52:10 kevin Exp $
 ;;;;
 ;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg
 ;;;;
@@ -59,7 +59,6 @@
         (cdr lb)
         (concatenate 'string accum (funcall func a b)))
       accum)))
-  
 
 
 (defun nsubseq (sequence start &optional (end (length sequence)))
index 7e9be34ce521f95c1a6c335a120b64dc10f6f7ef..028d97870c2fa4aacc96f5955f9fa1cabed95e8f 100644 (file)
@@ -7,7 +7,7 @@
 ;;;; Programmer:    Kevin M. Rosenberg
 ;;;; Date Started:  Apr 2000
 ;;;;
-;;;; $Id: strings.lisp,v 1.16 2003/04/30 02:16:21 kevin Exp $
+;;;; $Id: strings.lisp,v 1.17 2003/05/04 14:52:10 kevin Exp $
 ;;;;
 ;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg
 ;;;;
       do
     (setf start (1+ end))))
 
+(defun ndelimited-string-to-list (sequence &optional (separator #\space))
+  "Split a string by a delimitor"
+  (loop
+      with start = 0
+      for end = (position separator sequence :start start)
+      collect (nsubseq sequence start end)
+      until (null end)
+      do
+    (setf start (1+ end))))
+
 #+excl
 (defun list-to-delimited-string (list &optional (separator #\space))
   (excl:list-to-delimited-string list separator))
index a84404ca1c2fa57768047770931244aec25cb175..d5c079f7692867c1b292b54b55cc10c7ef68442a 100644 (file)
@@ -7,7 +7,7 @@
 ;;;; Author:        Kevin M. Rosenberg
 ;;;; Date Started:  Apr 2003
 ;;;;
-;;;; $Id: tests.lisp,v 1.5 2003/04/29 01:55:26 kevin Exp $
+;;;; $Id: tests.lisp,v 1.6 2003/05/04 14:52:10 kevin Exp $
 ;;;;
 ;;;; This file is Copyright (c) 2000-2002 by Kevin M. Rosenberg
 ;;;;
 (deftest str.16 (nstring-trim-last-character "a") "")
 (deftest str.17 (nstring-trim-last-character "ab") "a")
 
+(deftest str.18 (delimited-string-to-list "ab|cd|ef") '("ab" "cd" "ef"))
+(deftest str.19 (ndelimited-string-to-list "ab|cd|ef") '("ab" "cd" "ef"))
+(deftest str.20 (delimited-string-to-list "") nil)
+(deftest str.21 (ndelimited-string-to-list "") nil)
+(deftest str.22 (delimited-string-to-list "ab") '("ab"))
+(deftest str.23 (ndelimited-string-to-list "ab") '("ab"))
+(deftest str.24 (delimited-string-to-list "ab|") '("ab" ""))
+(deftest str.25 (ndelimited-string-to-list "ab|") '("ab" ""))
+  
 (eval-when (:compile-toplevel :load-toplevel :execute)
   (when (find-package '#:kmr-mop)
     (pushnew :kmrtest-mop cl:*features*)))