associateWith
Returns a Map where keys are characters from the given char sequence and values are produced by the valueSelector function applied to each character.
inline fun <V> CharSequence.associateWith(valueSelector: (Char) -> V): Map<Char, V>(source)
val charCodes = "hello".associateWith { it.code }