funcool / cuerdas

String manipulation library for Clojure(Script)
https://cljdoc.org/d/funcool/cuerdas/2020.03.26-3/
BSD 2-Clause "Simplified" License
304 stars 30 forks source link

Fix starts-with / ends-with #86

Closed AndyCorlin closed 2 years ago

AndyCorlin commented 2 years ago

(starts-with? "" "ab") / (ends-with? "" "ab") returned true which didn't make sense. Probably a regression bug from the rewrite in #4ff5b32.

AndyCorlin commented 2 years ago

Hi Andrey!

So here's the suggested fix. I took the opportunity to rearrange the test assertions so that the parameter pattern is equal for starts-with? / ends-with?, hope you don't mind.

This is my first public PR, so please tell me if I got something wrong.

Cheers, Anders

niwinz commented 2 years ago

looks nice, I will test it today and bump a releae with the fix.