Skip to main content

keyword_position_outside_literals

Function keyword_position_outside_literals 

Source
pub fn keyword_position_outside_literals(sql: &str, kw: &str) -> Option<usize>
Expand description

Return the byte position (relative to sql) of the first case-insensitive occurrence of the keyword kw that falls inside a Text segment. Returns None if not found.

The match is word-boundary-aware: the character immediately before the match (if any) must not be alphanumeric or _, and the character immediately after the match (if any) must not be alphanumeric or _.