      (common-prefix s1 s2)
      (->> s1
           .toString
-          (map #(when (or (= %1 %2)
-                          (= (Character/toUpperCase %1) %2)
-                          (= (Character/toLowerCase %1) %2))
-                  %1)
-               (.toString s2))
+          (map char-equal-ignore-case (.toString s2))
           (take-while (complement nil?))
           (apply str)))))
 

  "Return s if s contains any of the needles."
  ([^CharSequence s needles]
   (let [s (.toString s)
         needles (map #(.toString %) needles)]
     (some (partial case-sensitive-contains s) needles)))
  ([^CharSequence s needles ignore-case]
   (let [s (.toString s)
         needles (map #(.toString %) needles)]
     (if ignore-case
       (some (partial case-insensitive-contains s) needles)
       (contains-any? s needles)))))

(alias-ns clojure.string)

(defn- ^String slice-relative-to-end
  [^String s index length]
  (if (neg? (+ (.length s) index)) ; slice outside beg of s
    nil
    (slice s (+ (.length s) index) length)))
