Note: this conflicts (albeit trivially) with pull request #15.
I don't know what you want a substring of a negative length to do - but I'm pretty sure that you don't want it to assign a negative length to the string, as that'll mess up all sorts of other things down the line.
Ditto, I don't know what you want to do with a substring that starts and/or ends with a negative position - but I'm pretty sure that just blindly trying to read before the string isn't what you want to do.
Note: this conflicts (albeit trivially) with pull request #15.
I don't know what you want a substring of a negative length to do - but I'm pretty sure that you don't want it to assign a negative length to the string, as that'll mess up all sorts of other things down the line.
Ditto, I don't know what you want to do with a substring that starts and/or ends with a negative position - but I'm pretty sure that just blindly trying to read before the string isn't what you want to do.