Returns a subsequence from the specified position to the end of the collection.
- Xcode 10.2+
- Swift Standard Library
The index at which to start the resulting subsequence.
startmust be a valid index of the collection.
A subsequence starting at the
The following example searches for the index of the number
40 in an array of integers, and then prints the suffix of the array starting at that index:
Passing the collection’s
end as the
start parameter results in an empty subsequence.
suffix(from:) method is equivalent to using a partial range from the index as the collection’s subscript. The subscript notation is preferred over