Index: trunk/util.lisp
===================================================================
--- trunk/util.lisp	(revision trunk,17)
+++ trunk/util.lisp	(revision trunk,17)
@@ -0,0 +1,16 @@
+(in-package '#:dso-parse)
+
+
+
+(defmacro with-gensyms (syms &body body)
+  `(let (,@(mapcar (lambda (sym) `(,sym (gensym ,(symbol-name sym)))) syms))
+    ,@body))
+
+(defun substring (string &key (start 0) end length)
+  (when (and end length) (error "Specify only one of END or LENGTH."))
+  (when end (setf length (- end start)))
+  (unless length (setf length (- (length string) start)))
+  (make-array length
+	      :element-type 'character
+	      :displaced-to string
+	      :displaced-index-offset start))
