Skip to main content

raw_string_prefix

Function raw_string_prefix 

Source
fn raw_string_prefix(chars: &[char], i: usize) -> Option<(char, usize)>
Expand description

Check if position i starts an R 4.0+ raw string like r"(...)", R"[...]", r'(...)', R'{...}', etc. Returns the closing delimiter char and the number of chars consumed for the prefix (e.g. r"( = 3 chars) if it matches.