A suffix trie that enables efficient substring searching over stored strings.
It wraps StringTrie internally, storing all suffixes of each inserted string
to enable substring lookup. The API mirrors StringTrie for Dict-like
operations and adds suffix-trie-specific search functions.
Create an empty suffix trie.
Create a suffix trie with one key-value pair.
Insert a key-value pair into a suffix trie. Replaces value when there is a collision.
Update the value of a suffix trie for a specific key with a given function.
Remove a key-value pair from a suffix trie. If the key is not found, no changes are made.
Determine if a suffix trie is empty.
Determine if a key is in a suffix trie.
Get the value associated with a key.
Determine the number of key-value pairs in the suffix trie.
Get all of the keys in a suffix trie, sorted from lowest to highest.
Get all of the values in a suffix trie, in the order of their keys.
Convert a suffix trie into an association list of key-value pairs, sorted by keys.
Convert an association list into a suffix trie.
Apply a function to all values in a suffix trie.
Fold over the key-value pairs in a suffix trie from lowest key to highest key.
Fold over the key-value pairs in a suffix trie from highest key to lowest key.
Keep only the key-value pairs that pass the given test.
Partition a suffix trie according to some test. The first suffix trie contains all key-value pairs which passed the test, and the second contains the pairs that did not.
Combine two suffix tries. If there is a collision, preference is given to the first suffix trie.
Keep a key-value pair when its key appears in the second suffix trie. Preference is given to values in the first suffix trie.
Keep a key-value pair when its key does not appear in the second suffix trie.
The most general way of combining two suffix tries.
Given a prefix, finds all entries where the original key starts with that prefix.
Given a prefix, finds all entries where the original key starts with that prefix, ignoring case.
Given a prefix, checks if there are keys that begin with that prefix.
Does any stored key contain the given substring?
Returns all (key, value) pairs where the key contains the given substring.
Returns all (key, value, positions) triples where the key contains the given substring, along with the character positions where the substring occurs.
Case-insensitive variant of findSubstring.
Is the given string a suffix of any stored key?
Returns all (key, value) pairs where the key ends with the given suffix.
An opaque suffix trie type that maps strings to values and supports efficient substring searching.