From 90dc3329d1973fda691e357cf4523d5c7c67fa1d Mon Sep 17 00:00:00 2001 From: 杨锴 <841720330@qq.com> Date: 星期二, 11 三月 2025 12:23:53 +0800 Subject: [PATCH] fix bug --- Pods/SwifterSwift/Sources/SwifterSwift/SwiftStdlib/StringProtocolExtensions.swift | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Pods/SwifterSwift/Sources/SwifterSwift/SwiftStdlib/StringProtocolExtensions.swift b/Pods/SwifterSwift/Sources/SwifterSwift/SwiftStdlib/StringProtocolExtensions.swift index 4890ca5..6e61d40 100644 --- a/Pods/SwifterSwift/Sources/SwifterSwift/SwiftStdlib/StringProtocolExtensions.swift +++ b/Pods/SwifterSwift/Sources/SwifterSwift/SwiftStdlib/StringProtocolExtensions.swift @@ -11,7 +11,7 @@ /// - Parameter aString: The string with which to compare the receiver. /// - Parameter options: Options for the comparison. /// - Returns: The longest common suffix of the receiver and the given String. - func commonSuffix<T: StringProtocol>(with aString: T, options: String.CompareOptions = []) -> String { + func commonSuffix(with aString: some StringProtocol, options: String.CompareOptions = []) -> String { return String(zip(reversed(), aString.reversed()) .lazy .prefix(while: { (lhs: Character, rhs: Character) in @@ -32,12 +32,11 @@ /// - searchRange: The range in the receiver in which to search. /// - Returns: A new string in which all occurrences of regex pattern in searchRange of the receiver are replaced by /// template. - func replacingOccurrences<Target, Replacement>( - ofPattern pattern: Target, - withTemplate template: Replacement, + func replacingOccurrences( + ofPattern pattern: some StringProtocol, + withTemplate template: some StringProtocol, options: String.CompareOptions = [.regularExpression], - range searchRange: Range<Self.Index>? = nil) -> String where Target: StringProtocol, - Replacement: StringProtocol { + range searchRange: Range<Self.Index>? = nil) -> String { assert( options.isStrictSubset(of: [.regularExpression, .anchored, .caseInsensitive]), "Invalid options for regular expression replacement") -- Gitblit v1.7.1