 (defn ^String ends-with?
   "Return s if s ends with suffix."
   ([^String s ^String suffix]
+   {:pre [(string? s) (string? suffix)]
+    :post [(or (string? %) (nil? %))]}
    (when (.endsWith s suffix)
      s))
   ([^String s ^String suffix ignore-case]
+   {:pre [(string? s) (string? suffix)]
+    :post [(or (string? %) (nil? %))]}
    (if-not ignore-case
      (ends-with? s suffix)
      (let [end (substring s (max 0 (- (length s) (length suffix))))]

  "Pad both ends of s with padding, or spaces, until the length of s
  matches width."
  ([^String s width]
   (center s width " "))
  ([^String s width ^String padding]
   {:pre [(not-empty padding)

(defn ^String contains-all?
  "Return s if s contains all needles."
  ([^String s needles]
   {:pre [(string? s) (every? string? needles)]
    :post [(or (string? %) (nil? %))]}
   (when (every? (partial case-sensitive-contains s) needles)
     s))
  ([^String s needles ignore-case]
   {:pre [(string? s) (every? string? needles)]
    :post [(or (string? %) (nil? %))]}
   (if ignore-case
     (when (every? (partial case-insensitive-contains s) needles)
       s)
