String.compareTo: SinceKotlin in JS and common, restore default parameter value in JVM

Default parameter is required to generate docs with Dokka for now.

#KT-18067
This commit is contained in:
Ilya Gorbunov
2018-08-12 03:18:19 +03:00
parent f05a19aafb
commit 27dde5f730
3 changed files with 12 additions and 7 deletions
+7 -5
View File
@@ -158,6 +158,13 @@ expect fun String.replaceFirst(oldValue: String, newValue: String, ignoreCase: B
*/
expect fun String?.equals(other: String?, ignoreCase: Boolean = false): Boolean
/**
* Compares two strings lexicographically, optionally ignoring case differences.
*/
@SinceKotlin("1.2")
expect fun String.compareTo(other: String, ignoreCase: Boolean = false): Int
// From stringsCode.kt
internal inline expect fun String.nativeIndexOf(ch: Char, fromIndex: Int): Int
@@ -290,11 +297,6 @@ expect fun Int.toString(radix: Int): String
@SinceKotlin("1.2")
expect fun Long.toString(radix: Int): String
/**
* Compares two strings lexicographically, optionally ignoring case differences.
*/
expect fun String.compareTo(other: String, ignoreCase: Boolean = false): Int
@PublishedApi
internal expect fun checkRadix(radix: Int): Int