max

Common
JS
Native
1.7
@JvmName("maxOrThrow") fun CharSequence.max(): Char
(source)
JVM
1.0
@DeprecatedSinceKotlin("1.4", "1.5", "1.6") fun CharSequence.max(): Char?
(source)
Deprecated: Use maxOrNull instead.

Returns the largest character.

Exceptions

NoSuchElementException - if the char sequence is empty.