From 971da1b29e0b0015b57bbf2093b2bb2db67d1882 Mon Sep 17 00:00:00 2001 From: Sho Ikeda Date: Tue, 14 Nov 2017 13:41:05 +0900 Subject: [PATCH] `String.characters` is now deprecated in Swift 4.0.2 --- Source/CarthageKit/FrameworkExtensions.swift | 2 +- Source/carthage/Extensions.swift | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Source/CarthageKit/FrameworkExtensions.swift b/Source/CarthageKit/FrameworkExtensions.swift index 755ef75714..cfac72e370 100644 --- a/Source/CarthageKit/FrameworkExtensions.swift +++ b/Source/CarthageKit/FrameworkExtensions.swift @@ -22,7 +22,7 @@ extension String { /// Strips off a trailing string, if present. internal func stripping(suffix: String) -> String { if hasSuffix(suffix) { - let end = characters.index(endIndex, offsetBy: -suffix.count) + let end = index(endIndex, offsetBy: -suffix.count) return String(self[startIndex..(_ object: T) { extension String { /// Split the string into substrings separated by the given separators. internal func split(maxSplits: Int = .max, omittingEmptySubsequences: Bool = true, separators: [Character] = [ ",", " " ]) -> [String] { - return characters - .split(maxSplits: maxSplits, omittingEmptySubsequences: omittingEmptySubsequences, whereSeparator: separators.contains) + return split(maxSplits: maxSplits, omittingEmptySubsequences: omittingEmptySubsequences, whereSeparator: separators.contains) .map(String.init) } }