max

@JvmName(name = "maxOrThrow")
fun CharSequence.max(): Char(source)

Returns the largest character.

Since Kotlin

1.7

Throws

if the char sequence is empty.

Deprecated

Warning since 1.4

Error since 1.5

Hidden since 1.6

Use maxOrNull instead.

Replace with

this.maxOrNull()

Since Kotlin

1.0