Clojure – Strings upper-case

Clojure strings upper-case

In this guide, we will discuss Clojure Strings upper-case. 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

Next Topic : Click Here

This Post Has 2 Comments

Leave a Reply