Closed minghu6 closed 4 years ago
For example:
(defun whitespacep (c)
(let ((code (char-code c)))
(or
(= code 160)
(<= 0 code 32))))
Have you looked at cl:graphic-char-p
?
Wow, There is some ambiguous on concept for me. In strict, according to wiki, computer science called only both not corresponds to visible mark and did occupy an area on page char as whitespace. And in common case, people called zero length string or string only contains whitespace as blank line.
Although string only contains \Nul looks like a zero length string.
I have ever seemed every invisible char(in ascii scope)) and strict-whitespace as whitespace, that's my fault. (non-graphic-but-space
in short ?)
Anyway thanks your help!
AKA, code 0-31 are invisible char of ASCII alphabet, however not all of them are included in
whitespacep
which is against intuition especially the\Nul
isn't considerred whitespace.So, maybe extending
whitespacep
to cover all char whose code from 0 below 32 are more reasonable for whitespace ?