File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 14
14
//===----------------------------------------------------------------------===//
15
15
16
16
extension BidirectionalCollection {
17
+ /// Returns a subsequence containing the elements from the end until `predicate`
18
+ /// returns `false` and skipping the remaining elements.
19
+ ///
20
+ /// - Parameter predicate: A closure that takes an element of the
21
+ /// sequence as its argument and returns `true` if the element should
22
+ /// be included or `false` if it should be excluded. Once the predicate
23
+ /// returns `false` it will not be called again.
24
+ ///
25
+ /// - Complexity: O(*n*), where *n* is the length of the collection.
17
26
public func suffix(
18
27
while predicate: ( Element ) throws -> Bool
19
28
) rethrows -> SubSequence {
You can’t perform that action at this time.
0 commit comments