pub fn find_starts<S: AsRef<str>>(lines: &[S], block: &[String]) -> Vec<usize>Expand description
Find every non-overlapping occurrence of block in lines, scanning
forward. Returns the 0-based start indices.
ยงExamples
use coding_tools::block::find_starts;
let lines = ["a", "b", "c", "a", "b"];
let block = ["a".to_string(), "b".to_string()];
assert_eq!(find_starts(&lines, &block), vec![0, 3]);