Clojure - Strings lower-case



Converts string to all lower-case.

Syntax

Following is the syntax.

(lower-case s)

Parameters − Where ā€˜sā€™ is the string to be converted.

Return Value − The string in lowercase.

Example

Following is an example of lower-case in Clojure.

(ns clojure.examples.hello
   (:gen-class))
(defn hello-world []
   (println (clojure.string/lower-case "HelloWorld"))
   (println (clojure.string/lower-case "HELLOWORLD")))
(hello-world)

Output

The above program produces the following output.

helloworld
helloworld
clojure_strings.htm
Advertisements