Closed zitsen closed 4 months ago
Wow, I'll look through that.
Probably needs some more tests just to make sure it doesn't muck up indexing a single character ...
Thanks!
I've test it with cargo test
to confirm it wouldn't break anything. For char indexing, I've add a more complex test case to test both char-index and range-index on the same string.
Anyway let's merge this and see how it goes.
Now we support range indexing on strings, including ref/mut impls.
For example, you can use range indexing intead of sub_of_string() method like bellow:
Close #841