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

Posted by liszt on Stack Overflow See other posts from Stack Overflow or by liszt
Published on 2010-04-11T23:46:30Z Indexed on 2010/04/11 23:53 UTC
Read the original article Hit count: 223

Filed under:
|
|

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 outputs the #\newline character and skips #\return:

(format t "Hello world.~%")

I believe I could accomplish this using an outside argument, like this:

(format t "Hello world.~C~%" #\return)

But is seems awkward to me. Surely I can somehow embed #\return into the very format string, like I can #\newline?

Yeah ehh, I'm nitpicking.

Thanks for any help!

© Stack Overflow or respective owner

Related posts about common-lisp

Related posts about format