minOfOrNull

Returns the smallest value among all values produced by selector function applied to each character in the char sequence or null if the char sequence is empty.

inline fun CharSequence.minOfOrNull(selector: (Char) -> Double): Double?(source)
val text = "Kotlin"

val smallestCharCode = text.minOfOrNull { it.code.toDouble() }

println(smallestCharCode)  // prints the smallest Unicode code point value in the string

Source