Prelude API
    Preparing search index...

    Function longestPrefix

    • Returns the longest prefix of the input string found in the trie.

      Parameters

      • trie: t

        The radix trie to search in

      • input: string

        The string to find a longest prefix for

      • offset: number = 0

        The starting offset in the input string

      Returns string | undefined

      The longest prefix found, or undefined if no prefix exists