diff --git a/Sources/_StringProcessing/Algorithms/Matching/FirstMatch.swift b/Sources/_StringProcessing/Algorithms/Matching/FirstMatch.swift index de0cabb0..b8fdd514 100644 --- a/Sources/_StringProcessing/Algorithms/Matching/FirstMatch.swift +++ b/Sources/_StringProcessing/Algorithms/Matching/FirstMatch.swift @@ -19,6 +19,7 @@ extension BidirectionalCollection where SubSequence == Substring { /// - Returns: The first match of `regex` in the collection, or `nil` if /// there isn't a match. @available(SwiftStdlib 5.7, *) + @inlinable public func firstMatch( of r: some RegexComponent ) -> Regex.Match? { diff --git a/Sources/_StringProcessing/Regex/Match.swift b/Sources/_StringProcessing/Regex/Match.swift index 3ade1f2f..c0a3aca3 100644 --- a/Sources/_StringProcessing/Regex/Match.swift +++ b/Sources/_StringProcessing/Regex/Match.swift @@ -303,6 +303,7 @@ extension BidirectionalCollection where SubSequence == Substring { /// - Parameter regex: The regular expression to match. /// - Returns: The match, if one is found. If there is no match, or a /// transformation in `regex` throws an error, this method returns `nil`. + @inlinable public func wholeMatch( of regex: R ) -> Regex.Match? { @@ -314,6 +315,7 @@ extension BidirectionalCollection where SubSequence == Substring { /// - Parameter regex: The regular expression to match. /// - Returns: The match, if one is found. If there is no match, or a /// transformation in `regex` throws an error, this method returns `nil`. + @inlinable public func prefixMatch( of regex: R ) -> Regex.Match? {