X-Git-Url: http://git.kpe.io/?p=kmrcl.git;a=blobdiff_plain;f=strings.lisp;h=fd2f37ca071e8dc6a7f8f7b1a849cbf849d19738;hp=1832ff2a5dfa58f94564ee87f7b59587527c7b6e;hb=7367c68a5daa2ef45c7adf1f4097596f84f5e4dd;hpb=d60bf2d464b393bdff8482bcaacd8d49957467ce diff --git a/strings.lisp b/strings.lisp index 1832ff2..fd2f37c 100644 --- a/strings.lisp +++ b/strings.lisp @@ -602,20 +602,4 @@ for characters in a string" (push (subseq string token-start token-end) tokens))))) -(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))) - (cond - ((= len l) - (when (string= abbr s) - (push (cons s i) matches))) - ((< len l) - (when (string= abbr (subseq s 0 len)) - (push (cons s i) matches)))))) - (when (= 1 (length matches)) - (cdr (first matches))))) +