Std.PrefixTrie.withPrefix
1 declaration
fn
withPrefix: &Std.PrefixTrie.PrefixTrie[V] -> Str -> Array[(Str, V)]This is a callable function.
What it does
Every entry whose key begins with the prefix, in key order.
The question the trie exists for. It walks the prefix once and then collects
what is under it, so what it costs follows the prefix and the number of
matches rather than the size of the trie.
Read the signature
- The text after the name is the type checked by Pudu.
- Read arrows from left to right: inputs come first, and the final type is returned.
- & borrows a value for this call instead of moving or copying it.
- Names inside [ ] are type arguments, such as the item type held by a collection.
