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

  {:pre [(not (nil? s))]
   :post [(or (nil? %) (string? %))]}
  (when (reduce
         (fn [acc c]
           (and acc (or (Character/isUpperCase c) (= c (Character/toUpperCase c)))))
         true (.toString s))
    s))

(defn ^String swap-case
  "Change lower case characters to upper case and vice versa."
  [^CharSequence s]
  (let [invert-case (fn [^Character c]
                      (cond
                        (Character/isLowerCase c) (Character/toUpperCase c)
                        (Character/isUpperCase c) (Character/toLowerCase c)
                        :else c))]
    (->> s .toString (map invert-case) (apply str))))

(defn- ^String gen-padding
  "Generate the necessary padding to fill s upto width."
  [^CharSequence s ^CharSequence padding ^long width]
  (let [missing (- width (.length s))
