[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: String length 13 characters made of blank spaces
From: |
tomas |
Subject: |
Re: String length 13 characters made of blank spaces |
Date: |
Fri, 30 Oct 2020 09:12:18 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Fri, Oct 30, 2020 at 04:53:37AM +0100, Christopher Dimech wrote:
>
> Can one do the following to have a string length 13 characters
> made of blank spaces, or is it better to use some other construct?
>
> (make-string 13 ? )
That's perfectly fine. For that one character, it is customary
to escape it (i.e. to spell it out as "?\ ". For one, that makes
the space more visible, and then, you need the escape in the
cases where the character has a special meaning (try making a
string of thirteen open parentheses, for example).
Since the escape works always, you get a more consistent (and
arguably, readable) result by always putting a "\" there, i.e.
?\a instead of the equivalent ?a.
But just a matter of taste. In the case of space, since it's
nearly invisible, could send your readers into a tailspin.
Cheers
- t
signature.asc
Description: Digital signature