jua*_*eon 36
我不确定你想要实现什么,但format将"东西"转换为字符串.例如:
(format "%s" your-list)
Run Code Online (Sandbox Code Playgroud)
将返回您的列表的表示. message在内部使用格式,所以
(message "%s" your-list)
Run Code Online (Sandbox Code Playgroud)
会打印出来的
Ale*_*sky 19
(format) 会在字符串中嵌入括号,例如:
ELISP> (format "%s" '("foo" "bar"))
"(foo bar)"
Run Code Online (Sandbox Code Playgroud)
因此,如果您需要类似Ruby/JavaScript的模拟join(),那么(mapconcat):
ELISP> (mapconcat 'identity '("foo" "bar") " ")
"foo bar"
Run Code Online (Sandbox Code Playgroud)
要么
(prin1-to-string your-string)
Run Code Online (Sandbox Code Playgroud)
最后特别的东西
(princ your-string)
Run Code Online (Sandbox Code Playgroud)