Closed kilianmh closed 1 year ago
The char-code of #\Linefeed #\Newline (10) is identical and #\Linefeed even evaluates to #\Newline. So can #\Linefeed be discarded from the list?
I would keep the two and add a comment. Probably on some platforms they are different.
LGTM.
Now there's some documentation added.
2 more things came things came to my mind regarding whitespaces:
cl-str
?whitespaces
is basically a constant value, could/should it be defined as a constant (alexandria:define-constant
) or global variable (global-vars:define-global-var
) ? Then there would be no run-time boundness checks (for global-vars at least on SBCL, CCL, Lispworks) and as constant even value directly in place inserted at compilation (if i remember correctly).Now there's some documentation added.
+1
2 more things came things came to my mind regarding
whitespaces:
* Should we export the symbol, because someone might want to use it outside of `cl-str`?
good idea
Since
whitespaces
is basically a constant value, could/should it be defined as a constant (alexandria:define-constant
) or global variable (global-vars:define-global-var
) ? Then there would be no run-time boundness checks (for global-vars at least on SBCL, CCL, Lispworks) and as constant even value directly in place inserted at compilation (if i remember correctly).
I was saying: I'd rather not include another dependency (and AFAIK Alexandria is not a transitive dependency. The only one is cl-ppcre (and change-case, but that's cl-ppcre)).
but *whitespaces*
is not a constant value, a user could "let over" it (more so if it is exported).
Now *whitespaces*
is an exported symbol. Also the whitespace characters in the string-trim
examples in README are updated to the new character list.
I'd rather not include another dependency
Yeah it's probably good to keep the transitive dependency list small.
*whitespaces*
is not a constant value, a user could "let over" it (more so if it is exported)
Makes sense
Very nice again, thanks.
#\Vt
#\Next-Line
#\No-break_space
Two further questions might be:
#\Linefeed
#\Newline
(10) is identical and#\Linefeed
even evaluates to#\Newline
. So can#\Linefeed
be discarded from the list?