vindarel / cl-str

Modern, simple and consistent Common Lisp string manipulation library.
https://vindarel.github.io/cl-str/
MIT License
305 stars 37 forks source link

Introduce RSPLIT, similar to python's str.rsplit() #61

Closed tdrhq closed 3 years ago

tdrhq commented 3 years ago

There are many cases where rsplit is useful: dealing with directory strings, (and in my case) dealing with java style package names.

(PS. Is the algorithm I used correct? I think it is, but there may be an edge case that I haven't thought of)

vindarel commented 3 years ago

Hello,

At first sight it looks ok, but can you add more tests, especially the ones at the limit? We never know…

Similar to split, example we split from the end

*except?

And don't forget the README.

thanks for this addition, functions to ease working with pathnames are welcome.

tdrhq commented 3 years ago

@vindarel fixed, thanks for the review!

vindarel commented 3 years ago

Thanks again for your contribution!