previous Set Bit
Начиная с Kotlin: 1.3
fun previousSetBit(startIndex: Int): Int
Возвращает наибольший индекс бита, значение которого равно true перед startIndex (включительно). Возвращает -1, если перед startIndex нет таких битов или если startIndex == -1. Если startIndex>= size, поиск будет выполняться начиная с бита с индексом (size - 1).
Исключения
если startIndex< -1.
© 2010–2026 JetBrains s.r.o. and Kotlin Programming Language contributors
Licensed under the Apache License, Version 2.0.
https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.native/-bit-set/previous-set-bit.html