Skip to main content

get_match_intervals

Function get_match_intervals 

Source
pub fn get_match_intervals(content: &str, target: &str) -> Vec<Interval>
Expand description

获取 content 中所有匹配 target 的区间(大小写不敏感) 返回的区间为 [start, end),基于原始 content 的字节索引(保证在 char boundary 上)