- Sort Score
- Result 10 results
- Languages All
Results 1 - 2 of 2 for lineAndColumnFor (0.17 sec)
-
platforms/core-configuration/kotlin-dsl/src/main/kotlin/org/gradle/kotlin/dsl/execution/CharSequenceExtensions.kt
internal fun CharSequence.lineAndColumnFromRange(range: IntRange): Pair<Int, Int> { require(range.endInclusive <= lastIndex) return lineAndColumnFor(range.start) } /** * Computes the 1-based line and column numbers for the given [index]. */ internal fun CharSequence.lineAndColumnFor(index: Int): Pair<Int, Int> { val prefix = take(index) val lineCountBefore = prefix.count { it == '\n' }
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Wed Aug 02 08:06:49 UTC 2023 - 2.4K bytes - Viewed (0) -
platforms/core-configuration/kotlin-dsl/src/main/kotlin/org/gradle/kotlin/dsl/execution/ProgramSource.kt
preserve(*ranges.toTypedArray()) fun subText(range: IntRange): ProgramText = ProgramText(text.substring(range)) internal fun lineNumberOf(index: Int): Int = text.lineAndColumnFor(index).first private fun complementOf(ranges: Array<out IntRange>): ArrayList<IntRange> { require(ranges.isNotEmpty()) val sortedRanges = ranges.sortedBy { it.first }
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Wed Aug 02 08:06:49 UTC 2023 - 4.5K bytes - Viewed (0)