trying 0.5.1

Basic trie crate
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use trying::trie::TrieVec;
use unicode_segmentation::UnicodeSegmentation;

fn main() {
    // Create our trie
    let mut trie = TrieVec::<&str, usize>::new();

    // Insert some graphemes
    let s = "a̐éö̲\r\n";
    let input = s.graphemes(true);
    let count = input.clone().count();
    trie.insert_with_value(input.clone(), Some(count));
    assert!(trie.contains(input.clone()));
    assert!(trie.get(input.clone()).is_some());
    assert_eq!(trie.get(input), Some(&count));
}