JS stdlib: implement String.compareTo with ignoreCase
#KT-18067 Fixed
This commit is contained in:
committed by
Ilya Gorbunov
parent
d194893012
commit
f05a19aafb
@@ -317,7 +317,7 @@ public inline fun String.codePointCount(beginIndex: Int, endIndex: Int): Int =
|
||||
/**
|
||||
* Compares two strings lexicographically, optionally ignoring case differences.
|
||||
*/
|
||||
public fun String.compareTo(other: String, ignoreCase: Boolean = false): Int {
|
||||
public actual fun String.compareTo(other: String, ignoreCase: Boolean): Int {
|
||||
if (ignoreCase)
|
||||
return (this as java.lang.String).compareToIgnoreCase(other)
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user