Clojure-strings-lowercase

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

Clojure-小文字の文字列

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

構文

構文は次のとおりです。

(lower-case s)

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

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

以下は、Clojureの小文字の例です。

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

出力

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

helloworld
helloworld