chore: remove unused function

This commit is contained in:
Nikita Revenco 2024-11-12 18:10:32 +00:00
parent 757ad239e9
commit 49084538bc

View File

@ -17,40 +17,6 @@ fn char_match(&self, ch: char) -> bool {
}
}
pub fn find_nth_next_tag(
text: RopeSlice,
tag: &str,
mut pos: usize,
n: usize,
) -> Option<Vec<usize>> {
if pos >= text.len_chars() || n == 0 {
return None;
}
let mut chars = text.chars_at(pos);
let tag = format!("</{tag}>");
let len = tag.len();
for _ in 0..n {
loop {
let c = chars.next()?;
let cloned_chars = chars.clone();
let stri: String = cloned_chars.take(len).collect();
pos += 1;
if stri == tag {
break;
}
}
}
let range: Vec<usize> = (pos - 1..pos + len - 1).collect();
Some(range)
}
pub fn find_nth_next<M: CharMatcher>(
text: RopeSlice,
char_matcher: M,