MarisaTrieObjc
marisa-trie for Objective-c, published as a pod of CocoaPods
lint
pod lib lint --use-libraries
publish
pod trunk push MarisaTrie.podspec --use-libraries
usage(you should use it in Objective-c++, *.mm file):
- Podfile
platform :osx, '10.12'
target 'test-trie' do
pod 'MarisaTrie', "0.0.1"
end
-
pod update && pod install
-
demo code:
#import "marisa_trie_objc.h"
MarisaTrie* marisaTrie = [[MarisaTrie alloc] init];
[marisaTrie insertString: @"goods"];
[marisaTrie insertString: @"goodshoot"];
[marisaTrie insertString: @"goodson"];
[marisaTrie insertString: @"goodsell"];
[marisaTrie buildTrie];
NSArray* result = [marisaTrie queryTrie:@"good"];
NSLog(@"===queryed list is %@", result);