nfrankel
10/28/2016, 9:03 AMval toCapitalCase = fun String.() = when {
length < 2 -> toUpperCase()
else -> this[0].toUpperCase() + substring(1).toLowerCase()
}
and
fun String.toCapitalCase() = when {
length < 2 -> toUpperCase()
else -> this[0].toUpperCase() + substring(1).toLowerCase()
}