CTFuzzySearch 1.0.1

CTFuzzySearch 1.0.1

测试已测试
Lang语言 Obj-CObjective C
许可证 MIT
发布上次发布2016年3月

Christoph Wimberger 维护。



  • Christoph Wimberger 提供

CTFuzzySearch 是一个轻量级框架,用于进行快速模糊字符串搜索。

这个仓库包含了 CTFuzzySearch 引擎和示例用法。

代码示例

这个简约的代码示例应在几分钟内让您开始。对于更大的演示,请查看示例实现。

CTFuzzyIndex *index = [CTFuzzyIndex new];

// Add words to the index, these can be hundreds of thousands
[index addWordsFromString:@"fuzzy string searching using CTFuzzySearch" options:CTFuzzyIndexIncludeRanges];

// Search the index for matches of word with 2 errors maximum
NSArray *matches = [index search:@"zearchin" withMaxDistance:2];
for(CTFuzzyMatch *match in matches) {
    NSLog("Found %d occurrences of matching word '%@'.", [match.data count], match.value);
}