Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在 Common Lisp 中反转字符串?
我想将“Hello World”转换为“dlroW olleH”。在 Python 中,它是使用扩展 slice完成的:"Hello World"[::-1]。
"Hello World"[::-1]
reverse可以采用任何序列,包括字符串,因此您只需编写:
> (reverse "Hello World") "dlroW olleH"