Изменения в новых версиях / Clojure 1.8

;; *** before: ***
;; finding a substring meant a direct Java interop call
(require '[clojure.string :as str])
(.indexOf "clojure rocks" "rocks")
;=> 8

;; *** in version 1.8: ***
;; index-of and last-index-of wrap it as a plain Clojure function,
;; returning nil instead of -1 when nothing is found
(str/index-of "clojure rocks" "rocks")
;=> 8
(str/index-of "clojure rocks" "java")
;=> nil
(str/last-index-of "a-b-a-b" "a")
;=> 4