initials

fun String.initials(maxCount: Int = 2): String

Returns the upper cased first characters of up to maxCount whitespace separated words.

Returns an empty string when this string is blank or maxCount is zero or negative.