mimekit-ts - v1.0.0
    Preparing search index...

    Class Trie

    An Aho-Corasick trie graph.

    Index
    • Creates a new trie.

      Parameters

      • ignoreCase: boolean = false

        true if searching should ignore case; otherwise, false.

      Returns Trie

    • Adds a search pattern.

      Parameters

      • pattern: string

        The search pattern.

      Returns void

      pattern is null, undefined, or an empty string.

    • Searches text for any of the patterns added to the trie.

      Parameters

      • text: string

        The text to search.

      • startIndex: number = 0

        The starting index of the text.

      • count: number = ...

        The number of characters to search, starting at startIndex.

      Returns TrieSearchResult

      The first index of a matched pattern and the pattern that matched.

      text is null or undefined.

      startIndex and count do not specify a valid range in text.