pub fn next_word_position(&self) -> Option<Position> {
        // TODO: Reduce comparison.
        let a = self.core.next_keyword_position();
        let b = self.core.next_symbol_position();
        if a.is_none() {
            return b;
        }
        if b.is_none() {
            return a;
        }
        if a.unwrap() < b.unwrap() { a } else { b }
    }
/// Returns a position at the beginning of a next keyword or symbol.
///
/// Note that a "word" here is defined as a keyword or a symbol.
///
/// # Examples
///
/// ```
/// # use edit::editor::Editor;
/// use edit::editor::Position;
/// let editor = Editor::new("aa \n\
///                           *b ", 0, 0).unwrap();
/// let pos = editor.next_word_position();
/// assert_eq!(pos, Some(Position::new(1, 0)));
/// ```
Returns a position at the beginning of a next keyword or symbol.
Note that a "word" here is defined as a keyword or a symbol.
Returns a position at the beginning of a next keyword or symbol . Note that a " word " here is defined as a keyword or a symbol .
pub fn next_word_position(&self) -> Option<Position> {
        // TODO: Reduce comparison.
        let a = self.core.next_keyword_position();
        let b = self.core.next_symbol_position();
        if a.is_none() {
            return b;
        }
        if b.is_none() {
            return a;
        }
        if a.unwrap() < b.unwrap() { a } else { b }
    }
pub fn next_word_position ( & self ) -> Option < Position > { // TODO: Reduce comparison. let a = self . core . next_keyword_position ( ) ; let b = self . core . next_symbol_position ( ) ; if a . is_none ( ) { return b ; } if b . is_none ( ) { return a ; } if a . unwrap ( ) < b . unwrap ( ) { a } else { b } }
Returns a position at the beginning of a next keyword or symbol.
Returns a position at the beginning of a next keyword or symbol .
&self
&self
examples
None
use edit::editor::editor;
use edit::editor::Position;
let editor = Editor::new("aa \n\
b ", 0, 0).unwrap();
let pos = editor.next_word_position();
assert_eq!(pos, Some(Position::new(1, 0)));
```
use edit :: editor :: Position ; let editor = Editor :: new ( " aa \ n \ b " 0 0 ) . unwrap () ; let pos = editor . next_word_position () ; assert_eq! ( pos Some ( Position :: new ( 1 0 ))) ; ` ` `