extract

fun <T> BitSet<T>.extract(range: IntRange): T

Extracts range bits. e.g. 0b00001100.extract(2..3) = 0b11 = 0x03.