Trait StrExt

Source
pub trait StrExt {
    // Required methods
    fn column_count(&self) -> usize;
    fn indent_level(&self, indent_column_count: usize) -> usize;
    fn next_indent_level(&self, indent_column_count: usize) -> usize;
    fn prev_indent_level(&self, indent_column_count: usize) -> usize;
    fn find_next_word_boundary(
        &self,
        index: usize,
        word_separators: &[char],
    ) -> usize;
    fn find_prev_word_boundary(
        &self,
        index: usize,
        word_separators: &[char],
    ) -> usize;
    fn indent(&self) -> Option<&str>;
    fn longest_common_prefix(&self, other: &str) -> &str;
    fn graphemes(&self) -> Graphemes<'_> ;
    fn grapheme_indices(&self) -> GraphemeIndices<'_> ;
    fn split_whitespace_boundaries(&self) -> SplitWhitespaceBoundaries<'_> ;
}

Required Methods§

Source

fn column_count(&self) -> usize

Source

fn indent_level(&self, indent_column_count: usize) -> usize

Source

fn next_indent_level(&self, indent_column_count: usize) -> usize

Source

fn prev_indent_level(&self, indent_column_count: usize) -> usize

Source

fn find_next_word_boundary( &self, index: usize, word_separators: &[char], ) -> usize

Source

fn find_prev_word_boundary( &self, index: usize, word_separators: &[char], ) -> usize

Source

fn indent(&self) -> Option<&str>

Source

fn longest_common_prefix(&self, other: &str) -> &str

Source

fn graphemes(&self) -> Graphemes<'_>

Source

fn grapheme_indices(&self) -> GraphemeIndices<'_>

Source

fn split_whitespace_boundaries(&self) -> SplitWhitespaceBoundaries<'_>

Implementations on Foreign Types§

Source§

impl StrExt for str

Source§

fn column_count(&self) -> usize

Source§

fn indent_level(&self, indent_column_count: usize) -> usize

Source§

fn next_indent_level(&self, indent_column_count: usize) -> usize

Source§

fn prev_indent_level(&self, indent_column_count: usize) -> usize

Source§

fn find_next_word_boundary( &self, index: usize, word_separators: &[char], ) -> usize

Source§

fn find_prev_word_boundary( &self, index: usize, word_separators: &[char], ) -> usize

Source§

fn indent(&self) -> Option<&str>

Source§

fn longest_common_prefix(&self, other: &str) -> &str

Source§

fn graphemes(&self) -> Graphemes<'_>

Source§

fn grapheme_indices(&self) -> GraphemeIndices<'_>

Source§

fn split_whitespace_boundaries(&self) -> SplitWhitespaceBoundaries<'_>

Implementors§