INNER CODE UNIT · Kotlin

currentIndex

ReVanced/revanced-patcher · patcher/src/commonMain/kotlin/app/revanced/patcher/Matching.kt:788

    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,
        )

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…