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
true
if the element should be included orfalse
if it should be excluded. Once the predicate returnsfalse
it will not be called again.