Closed kilianmh closed 1 year ago
Hi, I like the feature, that's a great addition.
Re naming: is "char-bag" a usual name for this? If it's used in other libraries of other languages, then why not re-use it. If not, let's find a shorter name? (no good idea… simply "chars" ? I'll welcome the opinion of native english speakers, if char-bag is the best self-explanatory, so be it)
I think the examples (in the readme and the docstrings, yeah it's the same, we need to copy-paste one time) could be more straightforward by using strange letters around a common word, like "(trim "xyfooxy" :char-bag "xy"), but that's a nitpick.
The change requested should be done.
I chose char-bag
because
string-trim
its character-bagchar
is more used in parameterschars
is a straight forward short alternative. In the meantime the name char-set
came to my mind. It's same length, however character set is commonly used compared to character bag.
It's even char-bag for me:
(defun string-trim (char-bag string)
(generic-string-trim char-bag string t t))
looks good then.
A bit busy, will double check tomorrow.
Thanks!
add keyword parameter
char-bag
totrim
,trim-right
,trim-left
char-bag can be a sequence (e.g. list or string)
char-bag defaults to
*whitespaces*
update tests for trim functions
update documentation with examples
Is the parameter name
char-bag
appropriate? And do you like the documentation (same in docstring and readme)?