
In this guide, we will discuss Clojure Strings reverse. Reverses the characters in a string.
Syntax
Following is the syntax.
(reverse str)
Parameters β βstrβ is the string which needs to be reversed.
Return Value β The reversed string.
Example
Following is an example of reverse in Clojure.
(ns clojure.examples.hello (:gen-class)) (defn hello-world [] (println (reverse "Hello World"))) (hello-world)
Output
The above program produces the following output.
(d l r o W o l l e H)
Next Topic : Click Here
Pingback: Clojure - Strings split-lines | Adglob Infosystem Pvt Ltd
Pingback: Clojure - Strings | Adglob Infosystem Pvt Ltd