suffix(while:)
Returns a subsequence containing the elements from the end until predicate returns false and skipping the remaining elements.
func suffix(while predicate: (Element) throws -> Bool) rethrows -> SubSequence Parameters
- predicate
A closure that takes an element of the sequence as its argument and returns
trueif the element should be included orfalseif it should be excluded. Once the predicate returnsfalseit will not be called again.