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.
Both endpoints participate. Reversed ranges contain no values.
Parameters
value: The value to test.
Effects: pure
Runtime behavior: available everywhere; synchronous
Examples
Test inclusive membership
let activeChapters = 2u8..=5
let isActive = activeChapters.contains(5)