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
clojure_strings.htm
广告
© . All rights reserved.