static A stringTrie_longestPrefixValue(StringTrie trie, S string) { while licensed { if (trie == null) null; if (empty(string)) ret trie.value; S prefix = trie.longestLocalPrefix(string); if (empty(prefix)) ret trie.value; trie = trie.getChild(prefix); string = dropFirst(string, l(prefix)); } null; }