MCPcopy Create free account
hub / github.com/ashvardanian/StringZilla / skip_length

Method skip_length

rust/stringzilla.rs:2467–2474  ·  view source on GitHub ↗
(&self, include_overlaps: bool, is_reverse: bool)

Source from the content-addressed store, hash-verified

2465 }
2466
2467 fn skip_length(&self, include_overlaps: bool, is_reverse: bool) -> usize {
2468 match (include_overlaps, is_reverse) {
2469 (true, true) => self.needle_length().saturating_sub(1),
2470 (true, false) => 1,
2471 (false, true) => 0,
2472 (false, false) => self.needle_length(),
2473 }
2474 }
2475}
2476
2477/// An iterator over non-overlapping matches of a pattern in a string slice.

Callers 1

nextMethod · 0.45

Calls 1

needle_lengthMethod · 0.45

Tested by

no test coverage detected