Returns the substring of ‘s’ beginning at start inclusive, and ending at end (defaults to length of string), exclusive.
Following is the syntax.
(subs s start end)
Parameters − ‘S’ is the input string. ‘Start’ is the index position where to start the substring from. ‘End’ is the index position where to end the substring.
Return Value − The substring.
Following is an example of the string formatting in Clojure.
(ns clojure.examples.hello (:gen-class)) (defn hello-world  (println (subs "HelloWorld" 2 5)) (println (subs "HelloWorld" 5 7))) (hello-world)
The above program produces the following output.