View Source AhoCorasickNif.Native.Match (aho_corasick_nif v0.1.0-beta.2)

Struct to represent a match found by the Aho-Corasick algorithm.

Summary

Types

t()

A match found by the Aho-Corasick algorithm.

Types

@type t() :: %AhoCorasickNif.Native.Match{
  end: non_neg_integer(),
  match_: binary(),
  pattern: binary(),
  start: non_neg_integer()
}

A match found by the Aho-Corasick algorithm.

  • :pattern - the pattern that was matched
  • :match_ - the substring of the haystack that was matched
  • :start - the start index of the match in the haystack (inclusive)
  • :end - the end index of the match in the haystack (exclusive)