pub fn extract_word(
line: &str,
pos: usize,
esc_char: Option<char>,
is_break_char: fn(char) -> bool,
) -> (usize, &str)Expand description
Given a line and a cursor position,
try to find backward the start of a word.
Return (0, line[..pos]) if no break char has been found.
Return the word and its start position (idx, line[idx..pos]) otherwise.