vseloved / rutils

Radical Utilities for Common Lisp
Other
250 stars 37 forks source link

Added CUTSYM, SYMBOL-STARTS-WITH and SYMBOL-ENDS-WITH, and its tests #20

Closed EuAndreh closed 9 years ago

EuAndreh commented 9 years ago

Adds 3 symbol manipulating functions: CUTSYM, SYMBOL-STARTS-WITH and SYMBOL-ENDS-WITH, equivalent to SUBSTR, STARTS-WITH, and ENDS-WITH, but for symbols.

I also added the respective tests.

vseloved commented 9 years ago

Hi, I'm not sure that these functions are really worth being separate. For instance, you can easily simulate cutsym with the following one-liner: (mksym (slice (symbol-name orig-sym) beg end) :package desired-package). The other ones are also one-liners.

The most important question here, I think, is how frequently do you need them? For instance, in my work there's only a very occasional need for such utilities.

EuAndreh commented 9 years ago

I think you have a point: utilities should be more general purpose.

Thanks for the feedback =]