從字符串的左側(cè)刪除空格。
以下是triml的基本使用語(yǔ)法:
(triml str)
參數(shù)? 'str'是輸入字符串。
返回值 ? 從字符串開(kāi)頭刪除空格的字符串。
下面是triml函數(shù)的示例:
(ns clojure.examples.hello (:gen-class)) (defn hello-world [] (println (clojure.string/triml " White spaces "))) (hello-world)
以上示例將輸出以下結(jié)果:
White spaces
上面的輸出在字符串的末尾有空格。
更多建議: