maxWith

Common
JVM
JS
Native
1.7
@JvmName("maxWithOrThrow") fun CharSequence.maxWith(
    comparator: Comparator<in Char>
): Char

(source)

Returns the first character having the largest value according to the provided comparator.

Exceptions

NoSuchElementException - if the char sequence is empty.

JVM
1.0
@DeprecatedSinceKotlin("1.4", "1.5", "1.6") fun CharSequence.maxWith(
    comparator: Comparator<in Char>
): Char?

(source)
Deprecated: Use maxWithOrNull instead.