-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide a char_range method on Rope #13
Comments
This is also what prompted me to submit #12 - I figured it would be best to implement it once, rather than in two places. |
An alternative to this would be to implment iterators for let chars = rope.slice(10..20);
for ch in chars { ... } |
Seems like a good thing to add. However, it's worth thinking about the bytes vs chars distinction - the slice approach would be bytes bases. For |
That's a good point. I went with the bytes approach. Take a look at #14 and let me know what you think. |
Rope
provideschars
method which gives an iterator over all the chars in the Rope. This is great, but I find myself creating an iterator over all the data when I only really need a small subset.Being able to get an iterator over a subset of the entire dataset would be great. I envision it something like:
I am putting together an implementation of this now, but wanted your thoughts first to make sure it's something you see value in having.
The text was updated successfully, but these errors were encountered: