將字符串轉換為全大寫。
以下是upper-case的基本使用語法:
(upper-case s)
參數(shù) ? where's'是要轉換的字符串。
返回值 ? 大寫字符串。
下面是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)
以上示例將輸出以下結果:
HELLOWORLD HELLOWORLD
更多建議: