X-Git-Url: http://git.kpe.io/?p=kmrcl.git;a=blobdiff_plain;f=web-utils.lisp;h=40cb04018bed71dfd1883a0c09880261a7eda2f3;hp=35611eb0b9739bdd5c0c4b28d376ee84e0f1e008;hb=19bee416d52c52d58261faf3d459c45572563149;hpb=d11d6cc43fd9227a8aeed28dc2cfecdbc587ec4a diff --git a/web-utils.lisp b/web-utils.lisp index 35611eb..40cb040 100644 --- a/web-utils.lisp +++ b/web-utils.lisp @@ -111,3 +111,13 @@ (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 #\&)))