Skip to content
This repository was archived by the owner on May 29, 2025. It is now read-only.
This repository was archived by the owner on May 29, 2025. It is now read-only.

Provide a char_range method on Rope #13

@gchp

Description

@gchp

Rope provides chars 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:

// get the first 5 chars from the rope
let chars = rope.char_range(0..4);
// get chars from the 11th character to the end of the rope
let chars = rope.char_range(10..); 

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions