pp-to-string

pp-to-string is an autoloaded compiled Lisp function in `pp.el'.

(pp-to-string OBJECT)

Return a string containing the pretty-printed representation of OBJECT.
OBJECT can be any Lisp object. Quoting characters are used as needed
to make output that `read' can handle, whenever this is possible.