Returns a Boolean value indicating whether the initial elements of the sequence are the same as the elements in another sequence.
- iOS 13.0+
- macOS 10.15+
- Mac Catalyst 13.0+
- tvOS 13.0+
- watchOS 6.0+
- Xcode 11.0+
- Apple Crypto
A sequence to compare to this sequence.
true if the initial elements of the sequence are the same as the elements of
possible has no elements, the return value is
This example tests whether one countable range begins with the elements of another countable range.
Passing a sequence with no elements or an empty collection as
possible always results in
Complexity: O(m), where m is the lesser of the length of the sequence and the length of