从字符串的左侧删除空格。
以下是语法。
链接:https://www.learnfk.comhttps://www.learnfk.com/clojure/clojure-strings-triml.html
来源:LearnFk无涯教程网
(triml str)
参数 - ‘str'是输入字符串。
返回值 - 从字符串开头删除空格的字符串。
以下是Clojure中的Trimel示例。
(ns clojure.examples.hello (:gen-class)) (defn hello-world [] (println (clojure.string/triml " White spaces "))) (hello-world)
上面的程序产生以下输出。
White spaces
上面的输出将在字符串的末尾带有空格。
祝学习愉快!(内容编辑有误?请选中要编辑内容 -> 右键 -> 修改 -> 提交!)