Fix "Should be replaced with Kotlin function" warnings

This commit is contained in:
Dmitry Gridin
2019-04-16 12:12:06 +07:00
parent d738a12b86
commit 3bed360c98
77 changed files with 161 additions and 99 deletions
@@ -23,8 +23,8 @@ private val BEGIN_MARKER = "<~BEGIN~>"
private val END_MARKER = "<~END~>"
fun CharSequence.substringWithContext(beginIndex: Int, endIndex: Int, range: Int): String {
val start = Math.max(0, beginIndex - range)
val end = Math.min(this.length, endIndex + range)
val start = kotlin.math.max(0, beginIndex - range)
val end = kotlin.math.min(this.length, endIndex + range)
val notFromBegin = start != 0
val notToEnd = end != this.length