// range.contains() (10..<50).contains(50) // false (10...50).contains(50) // true ("a"..."m").contains("giraffe") // true // ~= operator 10...100 ~= 50 // true: ~= means "contains"
Hacking with Swift โฉ How to check whether a value is inside a range
Swift โฉ Sequence โฉ
contains(_:)
Last updated 2 years ago