Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
extract_word in datafusion_rustyline::completion - Rust
[go: Go Back, main page]

Function extract_word

Source
pub fn extract_word<'l>(
    line: &'l str,
    pos: usize,
    esc_char: Option<char>,
    break_chars: &BTreeSet<char>,
) -> (usize, &'l 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.