pub fn search_character(&self, ch: char) -> Option<usize> {
        let line = self.current_line_buffer();
        line[self.column()..].iter().position(|&x| x == ch).map(
            |n| {
                n + self.column()
            },
        )
    }
/// Searches for a character after the cursor in the current line, returning its index.
///
/// # Examples
///
/// ```
/// # use edit::editor::Editor;
/// let editor = Editor::new("a b c d\n\
///                           x", 0, 3).unwrap();
/// assert_eq!(editor.search_character('d'), Some(6));
/// assert_eq!(editor.search_character('x'), None);
/// ```
Searches for a character after the cursor in the current line, returning its index.
Searches for a character after the cursor in the current line returning its index .
pub fn search_character(&self, ch: char) -> Option<usize> {
        let line = self.current_line_buffer();
        line[self.column()..].iter().position(|&x| x == ch).map(
            |n| {
                n + self.column()
            },
        )
    }
pub fn search_character ( & self , ch : char ) -> Option < usize > { let line = self . current_line_buffer ( ) ; line [ self . column ( ) .. ] . iter ( ) . position ( | & x | x == ch ) . map ( | n | { n + self . column ( ) } , ) }
Searches for a character after the cursor in the current line, returning its index.
Searches for a character after the cursor in the current line returning its index .
&self
ch
char
&self
ch
char
examples
None
use edit::editor::editor;
let editor = Editor::new("a b c d\n\
x", 0, 3).unwrap();
assert_eq!(editor.search_character('d'), Some(6));
assert_eq!(editor.search_character('x'), None);
```
let editor = Editor :: new ( " a b c d \ n \ x " 0 3 ) . unwrap () ; assert_eq! ( editor . search_character ( ' d ' ) Some ( 6 )) ; assert_eq! ( editor . search_character ( ' x ' ) None ) ; ` ` `