Function rustyline::completion::extract_word
[−]
[src]
pub fn extract_word<'l>(
line: &'l str,
pos: usize,
esc_char: Option<char>,
break_chars: &BTreeSet<char>
) -> (usize, &'l str)
Given a line
and a cursor pos
ition,
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.