Clojure-strings-lowercase

提供:Dev Guides
2020年6月22日 (月) 22:43時点におけるMaintenance script (トーク | 投稿記録)による版 (Imported from text file)
(差分) ← 古い版 | 最新版 (差分) | 新しい版 → (差分)
移動先:案内検索

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