diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj
index 4db8753..699a2eb 100644
--- a/Example/Pods/Pods.xcodeproj/project.pbxproj
+++ b/Example/Pods/Pods.xcodeproj/project.pbxproj
@@ -325,7 +325,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0830;
- LastUpgradeCheck = 0940;
+ LastUpgradeCheck = 1020;
TargetAttributes = {
B8CD3B3EDB42EEABB2D487F8706AF6BB = {
LastSwiftMigration = 0940;
@@ -334,10 +334,11 @@
};
buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */;
compatibilityVersion = "Xcode 3.2";
- developmentRegion = English;
+ developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
+ Base,
);
mainGroup = 7DB346D0F39D3F0E887471402A8071AB;
productRefGroup = 3E67CB8AE63537296A06953357B839EA /* Products */;
@@ -425,7 +426,6 @@
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_SWIFT3_OBJC_INFERENCE = On;
- SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
@@ -436,6 +436,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
@@ -486,6 +487,7 @@
ONLY_ACTIVE_ARCH = YES;
PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/;
STRIP_INSTALLED_PRODUCT = NO;
+ SWIFT_VERSION = 5.0;
SYMROOT = "${SRCROOT}/../build";
};
name = Debug;
@@ -609,6 +611,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
@@ -654,6 +657,7 @@
IPHONEOS_DEPLOYMENT_TARGET = 8.3;
PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/;
STRIP_INSTALLED_PRODUCT = NO;
+ SWIFT_VERSION = 5.0;
SYMROOT = "${SRCROOT}/../build";
VALIDATE_PRODUCT = YES;
};
@@ -688,7 +692,6 @@
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = On;
- SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
diff --git a/Example/Pods/Pods.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Example/Pods/Pods.xcodeproj/project.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..919434a
--- /dev/null
+++ b/Example/Pods/Pods.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/Example/Pods/Pods.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Example/Pods/Pods.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000..18d9810
--- /dev/null
+++ b/Example/Pods/Pods.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Fuse.xcscheme b/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Fuse.xcscheme
index f924cfd..1b67405 100644
--- a/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Fuse.xcscheme
+++ b/Example/Pods/Pods.xcodeproj/xcshareddata/xcschemes/Fuse.xcscheme
@@ -1,6 +1,6 @@
(score: Double, ranges: [CountableClosedRange])? {
+ public func search(_ pattern: Pattern?, in aString: String) -> (score: Double, ranges: [ClosedRange])? {
guard let pattern = pattern else {
return nil
}
@@ -113,7 +113,7 @@ public class Fuse {
// Exact match
if (pattern.text == text) {
- return (0, [CountableClosedRange(0...textLength - 1)])
+ return (0, [0...textLength - 1])
}
let location = self.location
diff --git a/Fuse/Classes/FuseUtilities.swift b/Fuse/Classes/FuseUtilities.swift
index 99be1a9..f7a4ce2 100644
--- a/Fuse/Classes/FuseUtilities.swift
+++ b/Fuse/Classes/FuseUtilities.swift
@@ -54,8 +54,8 @@ class FuseUtilities {
/// - Parameter mask: A string representing the value to search for.
///
/// - Returns: `CountableClosedRange` array.
- static func findRanges(_ mask: [Int]) -> [CountableClosedRange] {
- var ranges = [CountableClosedRange]()
+ static func findRanges(_ mask: [Int]) -> [ClosedRange] {
+ var ranges = [ClosedRange]()
var start: Int = -1
var end: Int = -1
for (n, bit) in mask.enumerated() {
@@ -63,12 +63,12 @@ class FuseUtilities {
start = n
} else if bit == 0 && start != -1 {
end = n - 1
- ranges.append(CountableClosedRange(start...end))
+ ranges.append(start...end)
start = -1
}
}
if mask.last == 1 {
- ranges.append(CountableClosedRange(start...mask.count - 1))
+ ranges.append(start...(mask.count - 1))
}
return ranges
}
diff --git a/Fuse/Classes/String+Fuse.swift b/Fuse/Classes/String+Fuse.swift
index 9ed07be..98c5cac 100644
--- a/Fuse/Classes/String+Fuse.swift
+++ b/Fuse/Classes/String+Fuse.swift
@@ -31,7 +31,7 @@ extension String {
return nil
}
- if self.startIndex.encodedOffset + position > self.endIndex.encodedOffset {
+ if self.startIndex.utf16Offset(in: self) + position > self.endIndex.utf16Offset(in: self) {
return nil
}