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

Method needle_length

rust/stringzilla.rs:2460–2465  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

2458 }
2459
2460 fn needle_length(&self) -> usize {
2461 match self {
2462 MatcherType::Find(needle) | MatcherType::RFind(needle) => needle.len(),
2463 _ => 1,
2464 }
2465 }
2466
2467 fn skip_length(&self, include_overlaps: bool, is_reverse: bool) -> usize {
2468 match (include_overlaps, is_reverse) {

Callers 2

skip_lengthMethod · 0.45
nextMethod · 0.45

Calls 1

lenMethod · 0.80

Tested by

no test coverage detected