Re: Testing whitespace

Subject: Re: Testing whitespace
From: Brandon Ibach <bibach@xxxxxxxxxxxxxx>
Date: Sat, 11 Mar 2000 16:04:16 -0600
Quoting Jany Quintard <quintard.j@xxxxxx>:
> When processing the content (character data) of an element, I want to know
> if this element contains only space characters. It is easy to use a loop
> to check if each character is equal to #\space.
> But, a space can also be a newline, a tabulation and so on.
> So, is there a best way to check spaces (I guess using properties) than
> comparing a character to a list of values ?
> 
   Well, Peter will have to speak to the relative speed of this method
as opposed to using (member) against a list of whitespace characters,
but you could use:  (char-property 'input-whitespace? c), where "c" is
the character in question.
   This requires OpenJade 1.3, as 1.2.2 will simply return false for
every character.

-Brandon :)


 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread