Description
In my project I've had to define a splitAtTuple
but even after #69 was fixed I still use it because I don't like the Maybe
in the return type: just return an empty String
on one side!
I would prefer it if basically any string index was considered "valid" insofaras it would return a record instead of a Maybe
, with values ranging between { before: "", after: s }
and { before: s, after: "" }
.
Based on JavaScript String.prototype.substring
behavior, it looks like this would amount to just removing the conditional (since substrings with negative indices and indices beyond the end of the string just return the whole string or empty as appropriate).
Is this something you are willing to change again, or would it be best to introduce like a splitAt'
in this library with my suggested version?