Open tureck1y opened 5 years ago
I get the fatal error while trying to init itemSuffix: Can't form Range with upperBound < lowerBound. Reproducing with same Cyrillic string inside text and suggestion ( "Москва" for example) I can suggest this fix:
fileprivate func filter(forceShowAll addAll: Bool) { ... if item.title.lowercased().hasPrefix(textToFilter) { ... let itemSuffix: Substring = indexFrom < item.title.endIndex ? item.title.suffix(from: indexFrom) : "" ... } }
Xcode version 10.2.1
i have same Error
I get the fatal error while trying to init itemSuffix: Can't form Range with upperBound < lowerBound. Reproducing with same Cyrillic string inside text and suggestion ( "Москва" for example) I can suggest this fix: