• Searches for a key that matches the longest substring in input that starts at startIndex and ends at endIndex, and returns the corresponding leaf.

    Returns

    A leaf in the trie or null if there's no matching key.

    Type Parameters

    • T

      The value stored in a trie.

    Parameters

    • trie: Trie<T>

      The trie root.

    • input: string

      The string to search for the key from the trie.

    • Optional startIndex: number = 0
    • Optional endIndex: number = input.length

    Returns Trie<T> | null

Generated using TypeDoc