將字符串轉(zhuǎn)換為全大寫(xiě)。
以下是upper-case的基本使用語(yǔ)法:
(upper-case s)
參數(shù) ? where's'是要轉(zhuǎn)換的字符串。
返回值 ? 大寫(xiě)字符串。
下面是upper-case函數(shù)的示例:
(ns clojure.examples.hello (:gen-class)) (defn hello-world [] (println (clojure.string/upper-case "HelloWorld")) (println (clojure.string/upper-case "helloworld"))) (hello-world)
以上示例將輸出以下結(jié)果:
HELLOWORLD HELLOWORLD
更多建議: