[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
how to make a string
- To: shen@dolphin.Jpl.Nasa.Gov (Sheldon Shen)
- Subject: how to make a string
- From: Steve Strassmann <straz@cambridge.apple.com>
- Date: Mon, 6 Apr 1992 19:53:36 -0500
- Cc: Lynn.Brock@Eng.Sun.COM, info-mcl
>Date: Mon, 6 Apr 92 16:15:30 PDT
>From: shen@dolphin.Jpl.Nasa.Gov (Sheldon Shen)
>To: Lynn.Brock@Eng.Sun.COM (Lynn Brock [CONTRACTOR])
>Subject: Re: Scrolling windows with word wrap...
>Cc: info-mcl@cambridge.apple.com
>
>(defconstant *wsp&cr* #.(let ((str (make-string 7)))
> (set-schar str 0 #\Space)
> (set-schar str 1 #\^M)
> (set-schar str 2 #\^I)
> (set-schar str 3 #\^L)
> (set-schar str 4 #\^@)
> (set-schar str 5 #\^J)
> (set-schar str 6 (%code-char #xCA))
> str))
>
While you're at it, here's a little cleaner way to get the same string
constant. There's no need to use #. or funny ^@ characters (except maybe
for #\312, which is option-space), and no need to count up to 7 manually!
(defconstant *wsp&cr* (coerce '(#\space #\newline #\tab #\page #\null
#\linefeed #\312)
'string)
"Whitespace characters for wordwrapping.")