MCPcopy Create free account
hub / github.com/alexfertel/rust-algorithms / z_array

Function z_array

src/string/z_algorithm.rs:43–45  ·  view source on GitHub ↗
(input: &[T])

Source from the content-addressed store, hash-verified

41
42#[allow(dead_code)]
43pub fn z_array<T: Eq>(input: &[T]) -> Vec<usize> {
44 match_with_z_array(input, input, 1, false)
45}
46
47pub fn match_pattern<T: Eq>(input: &[T], pattern: &[T]) -> Vec<usize> {
48 match_with_z_array(input, pattern, 0, true)

Callers 1

test_z_arrayFunction · 0.85

Calls 1

match_with_z_arrayFunction · 0.85

Tested by 1

test_z_arrayFunction · 0.68