Clojure-strings-uppercase

提供:Dev Guides
移動先:案内検索

Clojure-大文字の文字列

文字列をすべて大文字に変換します。

構文

構文は次のとおりです。

(upper-case s)

パラメータ-「s」は変換される文字列です。

戻り値-大文字の文字列。

以下はClojureの大文字の例です。

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

出力

上記のプログラムは、次の出力を生成します。

HELLOWORLD
HELLOWORLD