MCPcopy Create free account
hub / github.com/EbTech/rust-algorithms / new

Method new

src/string_proc.rs:79–93  ·  view source on GitHub ↗

Precomputes the automaton that allows linear-time string matching. # Example ``` use contest_algorithms::string_proc::Matcher; let byte_string: &[u8] = b"hello"; let utf8_string: &str = "hello"; let vec_char: Vec = utf8_string.chars().collect(); let match_from_byte_literal = Matcher::new(byte_string); let match_from_utf8 = Matcher::new(utf8_string.as_bytes()); let match_from_chars = Match

(pattern: &'a [C])

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 3

insertMethod · 0.80
cloneMethod · 0.80
pushMethod · 0.45

Tested by

no test coverage detected