-(defun match-unique-abbreviation (abbr strings)
- "Returns position of ABBR in STRINGS. ABBR may be a unique abbreviation.
-Returns NIL if no match found."
- (let ((len (length abbr))
- (matches nil))
- (dotimes (i (length strings))
- (let* ((s (nth i strings))
- (l (length s)))
+
+(defun collapse-whitespace (s)
+ "Convert multiple whitespace characters to a single space character."
+ (declare (simple-string s)
+ (optimize (speed 3) (safety 0)))
+ (with-output-to-string (stream)
+ (do ((pos 0 (1+ pos))
+ (in-white nil)
+ (len (length s)))
+ ((= pos len))
+ (declare (fixnum pos len))
+ (let ((c (schar s pos)))
+ (declare (character c))