项目作者: TeodorDyakov

项目描述 :
String trie that supports wildcard search
高级语言: Java
项目地址: git://github.com/TeodorDyakov/wildcard-trie.git
创建时间: 2017-07-31T11:14:12Z
项目社区:https://github.com/TeodorDyakov/wildcard-trie

开源协议:

下载


wildcard-trie

A trie that stores strings. It can be quiried using wildcard syntax. currently the ‘*’ and ‘?’ wildcards are supported.

Example use:

  1. Trie t = new Trie(new String[] { "cafe", "coffee", "caffe", "cup", "java", "kaffe" });
  2. System.out.println(t.wildcardMatches("c*"));
  3. // [cafe, caffe, cup, coffee]
  4. System.out.println(t.wildcardMatches("c*e*"));
  5. // [cafe, caffe, coffee]
  6. System.out.println(t.wildcardMatches("?affe"));
  7. // [caffe, kaffe]