Removes whitespace from both ends of the string.
Following is the syntax.
Parameters − ‘str’ is the input string.
Return Value − The string which has the whitespaces removed.
Following is an example of trim in Clojure.
(ns clojure.examples.hello (:gen-class)) (defn hello-world  (println (clojure.string/trim " White spaces "))) (hello-world)
The above program produces the following output.