Skip to main content

CharRangesExt

Trait CharRangesExt 

Source
pub trait CharRangesExt {
    // Required method
    fn char_ranges(&self) -> CharRanges<'_> ;

    // Provided method
    fn char_ranges_offset(&self, offset: usize) -> CharRangesOffset<'_>  { ... }
}

Required Methods§

Source

fn char_ranges(&self) -> CharRanges<'_>

Returns an iterator over chars and their start and end byte positions.

See examples in the crate root.

Provided Methods§

Source

fn char_ranges_offset(&self, offset: usize) -> CharRangesOffset<'_>

Returns an iterator over chars and their start and end byte positions, with an offset applied to all positions.

See examples in the crate root.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl CharRangesExt for str

Implementors§