CharSlice

Trait CharSlice 

Source
pub trait CharSlice<R> {
    // Required method
    fn char_slice(&self, r: R) -> &str;
}
Expand description

This trait provides the char_slice method.

R should be one of the ranges in std::ops.

Required Methods§

Source

fn char_slice(&self, r: R) -> &str

Returns a substring of self specified by the given range.

In case of invalid input, this method will return the empty string.

Implementations on Foreign Types§

Source§

impl CharSlice<Range<usize>> for str

Source§

fn char_slice(&self, r: Range<usize>) -> &str

Source§

impl CharSlice<RangeFrom<usize>> for str

Source§

impl CharSlice<RangeFull> for str

Source§

fn char_slice(&self, _: RangeFull) -> &str

Source§

impl CharSlice<RangeTo<usize>> for str

Source§

fn char_slice(&self, r: RangeTo<usize>) -> &str

Implementors§