SplitScript reference / T..<T / contains
T..<T.contains
Method
T..<T.contains(value: T) -> bool where T: Integer
Reports whether a value belongs to this range.
The lower endpoint participates and the upper endpoint does not. Reversed ranges contain no values.
Parameters
value: The value to test.
Effects: pure
Runtime behavior: available everywhere; synchronous
Examples
Test exclusive membership
let activeChapters = 2u8..<5
let isActive = activeChapters.contains(4)