michaelsproul / rust_radix_trie

Fast generic radix trie implemented in Rust
https://docs.rs/radix_trie/
MIT License
184 stars 32 forks source link

Expect a feature to get all prefix match values. #67

Closed silence-coding closed 2 years ago

silence-coding commented 3 years ago

I wish the radius_trie would provide a feature to get the values for all prefix matches.

    let mut trie = Trie::new();
    trie.insert("/a/c", "/a/c");
    trie.insert("/a/b/", "/a/b/");
    trie.insert("/a/b/c", "/a/b/c");
    assert_eq!(vec!["/a/b/", "/a/b/c"], trie.get_ancestor_values("/a/b/c"));