INNER CODE UNIT · Kotlin
lastMatchedIndex
ReVanced/revanced-patcher · patcher/src/commonMain/kotlin/app/revanced/patcher/Matching.kt:787
private var lastMatchedIndex = -1
private var currentIndex = -1
private var nextIndex: Int? = null
override fun invoke(haystack: Iterable<T>): Boolean {
// Ensure list for indexed access.
val hay = haystack as? List<T> ?: haystack.toList()
indices.clear()
this@IndexedMatcher.lastMatchedIndex = -1
currentIndex = -1
data class Frame(
val patternIndex: Int,
val lastMatchedIndex: Int,
val previousFrame: Frame?,
var nextHayIndex: Int,
val matchedIndex: Int,