   ([^String s ^long width]
    (pad-left s width " "))
   ([^String s ^long width ^String padding]
-   {:pre [(not-empty padding)]
+   {:pre [(not-empty padding)
+          (not (nil? s))]
     :post [(= (.length %) width)]}
    (if (<= width (.length s))
      s

(ns str.core
  (:require clojure.string
            [clojure.string :as str])
  (:refer-clojure :exclude [reverse replace contains?]))

(declare slice)

  ([^String s ^long width]
   (pad-right s width " "))
  ([^String s ^long width ^String padding]
   {:pre [(not-empty padding)
          (not (nil? s))]
    :post [(= (.length %) width)]}
   (if (<= width (.length s))
     s
