Common Lisp's equivalent of \r inside the format function?

后端 未结 2 822
感动是毒
感动是毒 2021-01-31 08:11

Basically, I\'d like to do the following, only using Common Lisp instead of Python:

print(\"Hello world.\\r\\n\")

I can do this, but it only ou

2条回答
  •  孤独总比滥情好
    2021-01-31 08:18

    First, in Common Lisp most characters, including return/newline, can be inserted directly into the string. The only character requiring escaping is the string delimiter.

    There is also a library cl-interpol which provides a read macro to construct strings with more complex syntax, including special character escapes.

提交回复
热议问题