;;AUTOLOAD: compare-nocase
;;AUTODOC: compare-nocase "compare strings in a case-independant way"
;; (compare-nocase string1 string2)
;;
;; Compares 2 strings, as compare, by returning a negative, null or positive
;; integer if string1 is before, the same or after string2 in lexicographic 
;; order, but the case of letters being unsignificant, unlike compare.

(defun compare-nocase (s1 s2)
  (compare (tolower s1) (tolower s2))
)


;; Obsolte functions, here for programming examples.
;; C functions goes 1000 times faster!
;;============================================================================
;; (defun stringcase:lower-char (c)
;;   (if (and (>= c #\A) (<= c #\Z))
;;     (+ c 32)
;;     c
;; ))
;; 
;; (defun stringcase:upper-char (c)
;;   (if (and (>= c #\a) (<= c #\z))
;;     (- c 32)
;;     c
;; ))
;; 
;; ;;AUTODOC: tolower "convert string to lower case"
;; ;; Usage: (tolower string)
;; ;; returns a string which is a copy of arguments with all letters converted 
;; ;; to lower case
;; 
;; (defun tolower (s)
;;   (map String stringcase:lower-char s)
;; )
;; 
;; ;;AUTODOC: toupper "convert string to upper case"
;; ;; Usage: (toupper string)
;; ;; returns a string which is a copy of arguments with all letters converted 
;; ;; to lower case
;; 
;; (defun toupper (s)
;;   (map String stringcase:upper-char s)
;; )

