prin1-to-string object string
princ-to-string object string
array - a generalized boolean.
base - a radix.
case - a symbol of type (member :upcase :downcase :capitalize).
circle - a generalized boolean.
escape - a generalized boolean.
gensym - a generalized boolean.
length - a non-negative integer, or nil.
level - a non-negative integer, or nil.
lines - a non-negative integer, or nil.
miser-width - a non-negative integer, or nil.
pprint-dispatch - a pprint dispatch table.
pretty - a generalized boolean.
radix - a generalized boolean.
readably - a generalized boolean.
right-margin - a non-negative integer, or nil.
string - a string.
write-to-string is the general output function. It has the ability to specify all the parameters applicable to the printing of object.
prin1-to-string acts like write-to-string with :escape t, that is, escape characters are written where appropriate.
princ-to-string acts like write-to-string with :escape nil :readably nil. Thus no escape characters are written.
All other keywords that would be specified to write-to-string are default values when prin1-to-string or princ-to-string is invoked.
The meanings and defaults for the keyword arguments to write-to-string are the same as those for write.
(prin1-to-string "abc") "\"abc\"" (princ-to-string "abc") "abc"
(write-to-string object {key argument}*) ==(with-output-to-string (#1=#:string-stream) (write object :stream #1# {key argument}*)) (princ-to-string object) ==(with-output-to-string (string-stream) (princ object string-stream)) (prin1-to-string object) ==(with-output-to-string (string-stream) (prin1 object string-stream))