目录

reverse

反转字符串中的字符。

语法 (Syntax)

以下是语法。

(reverse str)

Parameters - 'str'是需要反转的字符串。

Return Value - 反向字符串。

例子 (Example)

以下是Clojure中的反向示例。

(ns clojure.examples.hello
   (:gen-class))
(defn hello-world []
   (println (reverse "Hello World")))
(hello-world)

输出 (Output)

上述程序产生以下输出。

(d l r o W   o l l e H)                                                        
↑回到顶部↑
WIKI教程 @2018