maxBy

inline fun <R : Comparable<R>> CharSequence.maxBy(selector: (Char) -> R): Char?(source)

Deprecated

Use maxByOrNull instead.

Replace with

this.maxByOrNull(selector)

Since Kotlin

1.0