Skip to main content

CharRange

Type Alias CharRange 

Source
pub type CharRange = Range<CharIndex>;
Expand description

A range of CharIndex, i.e. a character range into a str.

Aliased Type§

pub struct CharRange {
    pub start: CharIndex,
    pub end: CharIndex,
}

Fields§

§start: CharIndex

The lower bound of the range (inclusive).

§end: CharIndex

The upper bound of the range (exclusive).

Trait Implementations§

Source§

impl CharRangeExt for CharRange

Source§

fn full(text: &str) -> Self

The full character range covering text, i.e. 0..text.chars().count().