Here's what we do:

(defglobal ?*CR* = (call (new java.lang.Character 13) toString))
(defglobal ?*LF* = (call (new java.lang.Character 10) toString))
(defglobal ?*TAB*  = (call (new java.lang.Character 9) toString))
(defglobal ?*CRLF* = (str-cat ?*CR* ?*LF*))

Then use (str-cat) a lot.

        (format nil (str-cat "foo bar" ?*CRLF*))

If anyone has an easier way, please let me know!

        cy


On Wed, Jan 29, 2003 at 01:12:05PM -0500, Richard Kasperowski wrote:
> I want to build strings that have new line characters in them, but 
> putting \n in my string doesn't do it:
> 
> Jess> (format nil "foo bar\n")
> "foo barn"
> 
> I don't want a "foo barn"; that would be a silly barn.  Instead, I want 
> a "foo bar
> ".  Is there a way to do this?
> 
> Thanks,
> 
> -- 
> Richard Kasperowski
> Tel: 617-576-1552, Fax: 617-576-2441
> mailto:[EMAIL PROTECTED]
> http://www.altisimo.com/
> 
> --------------------------------------------------------------------
> To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
> in the BODY of a message to [EMAIL PROTECTED], NOT to the list
> (use your own address!) List problems? Notify [EMAIL PROTECTED]
> --------------------------------------------------------------------

--------------------------------------------------------------------
To unsubscribe, send the words 'unsubscribe jess-users [EMAIL PROTECTED]'
in the BODY of a message to [EMAIL PROTECTED], NOT to the list
(use your own address!) List problems? Notify [EMAIL PROTECTED]
--------------------------------------------------------------------

Reply via email to