r8931: command-output fixes
[kmrcl.git] / web-utils.lisp
index 2f0c3a51ae4fdabf66b2e6342c1f4001e9d9fdf5..40cb04018bed71dfd1883a0c09880261a7eda2f3 100644 (file)
@@ -7,7 +7,7 @@
 ;;;; Programmer:    Kevin M. Rosenberg
 ;;;; Date Started:  Apr 2000
 ;;;;
-;;;; $Id: web-utils.lisp,v 1.16 2003/06/17 06:18:09 kevin Exp $
+;;;; $Id$
 ;;;;
 ;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg
 ;;;;
             (t
              (setf (schar new p-new) c)
              (incf p-old))))))
+
+(defun split-uri-query-string (s)
+  (mapcar
+   (lambda (pair)
+     (let ((pos (position #\= pair)))
+       (when pos
+        (cons (subseq pair 0 pos)
+              (when (> (length pair) pos)
+                (decode-uri-query-string (subseq pair (1+ pos))))))))
+   (delimited-string-to-list s #\&)))