Commit 8c6d1bd0 authored by Steven杜宇's avatar Steven杜宇

// 搜索大小写忽略

parent ef888e94
...@@ -108,7 +108,7 @@ class YHSearchInfoCell: UITableViewCell { ...@@ -108,7 +108,7 @@ class YHSearchInfoCell: UITableViewCell {
var occurrences: [Range<String.Index>] = [] var occurrences: [Range<String.Index>] = []
var searchStartIndex = string.startIndex var searchStartIndex = string.startIndex
while let range = string.range(of: searchString, options: [], range: searchStartIndex..<string.endIndex) { while let range = string.range(of: searchString, options: [.caseInsensitive], range: searchStartIndex..<string.endIndex) {
occurrences.append(range) occurrences.append(range)
searchStartIndex = range.upperBound searchStartIndex = range.upperBound
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment