diff --git a/Tests/FoundationEssentialsTests/AttributedString/AttributedStringTestSupport.swift b/Tests/FoundationEssentialsTests/AttributedString/AttributedStringTestSupport.swift index 78e78bee3..df8f443d0 100644 --- a/Tests/FoundationEssentialsTests/AttributedString/AttributedStringTestSupport.swift +++ b/Tests/FoundationEssentialsTests/AttributedString/AttributedStringTestSupport.swift @@ -153,17 +153,3 @@ enum TestError: Error { case conversionError case markdownError } - -#if !FOUNDATION_FRAMEWORK - -extension AttributedStringProtocol { - func range(of other: String) -> Range? { - let str = String(characters) - guard let strRange = str.firstRange(of: other) else { return nil } - let start = str.unicodeScalars.distance(from: str.startIndex, to: strRange.lowerBound) - let end = str.unicodeScalars.distance(from: str.startIndex, to: strRange.upperBound) - return unicodeScalars.index(startIndex, offsetBy: start) ..< unicodeScalars.index(startIndex, offsetBy: end) - } -} - -#endif // !FOUNDATION_FRAMEWORK