Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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<Output>(
of r: some RegexComponent<Output>
) -> Regex<Output>.Match? {
Expand Down
2 changes: 2 additions & 0 deletions Sources/_StringProcessing/Regex/Match.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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<R: RegexComponent>(
of regex: R
) -> Regex<R.RegexOutput>.Match? {
Expand All @@ -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<R: RegexComponent>(
of regex: R
) -> Regex<R.RegexOutput>.Match? {
Expand Down