compareTo

expect fun String.compareTo(other: String, ignoreCase: Boolean = false): Int(source)

Compares two strings lexicographically, optionally ignoring case differences.

If ignoreCase is true, the result of Char.uppercaseChar().lowercaseChar() on each character is compared.

Since Kotlin

1.2
actual fun String.compareTo(other: String, ignoreCase: Boolean = false): Int(source)

Compares two strings lexicographically, optionally ignoring case differences.

If ignoreCase is true, the result of Char.uppercaseChar().lowercaseChar() on each character is compared.

Since Kotlin

1.2
actual fun String.compareTo(other: String, ignoreCase: Boolean = false): Int(source)

Compares two strings lexicographically, optionally ignoring case differences.

If ignoreCase is true, the result of Char.uppercaseChar().lowercaseChar() on each character is compared.

Since Kotlin

1.0
actual fun String.compareTo(other: String, ignoreCase: Boolean = false): Int(source)

Compares two strings lexicographically, optionally ignoring case differences.

If ignoreCase is true, the result of Char.uppercaseChar().lowercaseChar() on each character is compared.

Since Kotlin

1.3
actual fun String.compareTo(other: String, ignoreCase: Boolean = false): Int(source)

Compares two strings lexicographically, optionally ignoring case differences.

If ignoreCase is true, the result of Char.uppercaseChar().lowercaseChar() on each character is compared.

Since Kotlin

1.8
actual fun String.compareTo(other: String, ignoreCase: Boolean = false): Int(source)

Compares two strings lexicographically, optionally ignoring case differences.

If ignoreCase is true, the result of Char.uppercaseChar().lowercaseChar() on each character is compared.

Since Kotlin

1.8