I was playing around with roc and I think I found a bug in the Str.splitFirst
function. When calling splitFirst with 2 identical strings, it should return Ok { before: "", after: ""
, however it returns Err NotFound
. If this is the intended behaviour, it is inconsistent with Str.splitLast
.
I had a look in the source and I figured out the error.
Do I create a new pull request? I will also add some extra tests to make sure it doesn't happen again
yes, that sounds good!
Made the pull request!
Last updated: Jul 06 2025 at 12:14 UTC