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

    Returns

    The result object or null if there's no matching key.

    Type Parameters

    • T

      The value stored in a trie.

    Parameters

    • trie: ArrayTrie<T>

      The array trie.

    • input: string

      The string to search for the key from the trie.

    • Optional startIndex: number = 0
    • Optional endIndex: number = input.length
    • Optional result: ArrayTrieSearchResult<T>

      The in-out parameter, that holds the search result. If omitted, a new object is returned on every call.

    Returns ArrayTrieSearchResult<T> | null

Generated using TypeDoc