目录

triml

从字符串的左侧删除空格。

语法 (Syntax)

以下是语法。

(triml str)

Parameters - 'str'是输入字符串。

Return Value - 从字符串开头删除空格的字符串。

例子 (Example)

以下是Clojure中修剪的示例。

(ns clojure.examples.hello
   (:gen-class))
(defn hello-world []
   (println (clojure.string/triml " White spaces ")))
(hello-world)

输出 (Output)

上述程序产生以下输出。

White spaces

上面的输出将在字符串的末尾有空格。

↑回到顶部↑
WIKI教程 @2018