class CharRange
source · line 9public
public class CharRange private constructor(private val indices: IntRange) : Iterable<Char>, Contains<Char>
- Supertype
Iterable<Char> - Supertype
Contains<Char>
An immutable range of Unicode scalar values. Iteration and step alignment skip the surrogate interval, so U+D7FF and U+E000 are adjacent.
function contains
source · line 29public
public override operator fun contains(value: Char): Boolean
- Overrides
contains· Contains
Returns whether iteration with this range's bounds and step yields value.
parameter value
source · line 29public
value: Char
function iterator
source · line 20public
public override operator fun iterator(): Iterator<Char>
- Overrides
iterator· Iterable
Creates a fresh cursor over the range's scalar values.
function step
source · line 26public
public infix fun step(value: Int): CharRange
Replaces the step in scalar positions, preserving the start, direction, and endpoint policy. Zero or negative steps throw IllegalArgumentException.
parameter value
source · line 26public
value: Int