Returns a Boolean value indicating whether the initial elements of the sequence are the same as the elements in another sequence.
A sequence to compare to this sequence.
true if the initial elements of the sequence are the same as the elements of
possiblePrefix has no elements, the return value is
This example tests whether one countable range begins with the elements of another countable range.
let a = 1...3 let b = 1...10 print(b.starts(with: a)) // Prints "true"
Passing a sequence with no elements or an empty collection as
possiblePrefix always results in
print(b.starts(with: )) // Prints "true"