* gnus-util.el (gnus-string<): New function.
[gnus] / lisp / gnus-util.el
index 3d59e93..80c36e2 100644 (file)
@@ -254,6 +254,16 @@ is slower."
   (not (or (string< s1 s2)
           (string= s1 s2))))
 
+(defun gnus-string< (s1 s2)
+  "Return t if first arg string is less than second in lexicographic order.
+Case is significant if and only if `case-fold-search' is nil.
+Symbols are also allowed; their print names are used instead."
+  (if (symbolp s1) (setq s1 (symbol-name s1)))
+  (if (symbolp s2) (setq s2 (symbol-name s2)))
+  (if case-fold-search
+      (string-lessp (downcase s1) (downcase s2))
+    (string-lessp s1 s2)))
+
 ;;; Time functions.
 
 (defun gnus-file-newer-than (file date)