Skip to main content

TextRangeExt

Trait TextRangeExt 

Source
pub trait TextRangeExt {
    // Required method
    fn contains_range(&self, range: &Range<usize>) -> bool;
}
Expand description

UTF-8 text range containment checks.

Required Methods§

Source

fn contains_range(&self, range: &Range<usize>) -> bool

Returns whether range is ordered, in bounds, and lies on character boundaries.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl TextRangeExt for str

Source§

fn contains_range(&self, range: &Range<usize>) -> bool

Implementors§