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:
@@ -317,7 +317,8 @@ public inline fun String.codePointCount(beginIndex: Int, endIndex: Int): Int =
|
||||
/**
|
||||
* Compares two strings lexicographically, optionally ignoring case differences.
|
||||
*/
|
||||
public actual fun String.compareTo(other: String, ignoreCase: Boolean): Int {
|
||||
@Suppress("ACTUAL_FUNCTION_WITH_DEFAULT_ARGUMENTS")
|
||||
public actual fun String.compareTo(other: String, ignoreCase: Boolean = false): Int {
|
||||
if (ignoreCase)
|
||||
return (this as java.lang.String).compareToIgnoreCase(other)
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user