Instance Methodswift 6.0.1_RegexParser->Swift
tryDropSuffix(_:)
Attempts to drop a given suffix from the collection.
func tryDropSuffix<C>(_ other: C) -> Self.SubSequence? where C : Collection, Self.Element == C.Element
Parameters
- other
The collection that contains the suffix.
Returns
The resulting subsequence, or nil
if the prefix doesn’t match.
Other members in extension
Instance members
func tryDropPrefix<C>(C
) -> Self.SubSequence? Attempts to drop a given prefix from the collection.