Clojure - Strings upper-case


Advertisements

Converts string to all upper-case.

Syntax

Following is the syntax.

(upper-case s)

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

Return Value − The string in uppercase.

Example

Following is an example of upper-case in Clojure.

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

Output

The above program produces the following output.

HELLOWORLD
HELLOWORLD
clojure_strings.htm
Advertisements