test
test copied to clipboard
Fix undefined behavior in `basic_cstring::rfind`
Getting the pointer to 1-before an array is undefined behavior, i.e. begin() - 1 is not allowed.
So modify rfind to loop until the front and do a final comparison with begin()/first afterwards before returning npos.
Use a better-suited for-loop and modify find to look as similar as possible so the difference is easy to spot.
Fixes #357