title: Is there a shorter replacement for Kotlin's deprecated String.capitalize() function?
body: <p>Kotlin deprecated the <code>capitalize</code> function on <code>String</code> class, and their suggested replacement is obnoxiously long.  This is an example of a situation where they made the right call on deprecating it, but the wrong call on the user experience.</p>
  <p>For example, this code:</p>
  <pre><code>val x = listOf(&quot;foo&quot;, &quot;bar&quot;, &quot;baz&quot;).map { it.capitalize() }
  </code></pre>
  <p>is &quot;cleaned up&quot; by the IDE to become:</p>
  <pre><code>val x = listOf(&quot;foo&quot;, &quot;bar&quot;, &quot;baz&quot;).map { it.replaceFirstChar {
                      if (it.isLowerCase()) it.titlecase(
                          Locale.getDefault()
                      ) else it.toString()
                  } }
  </code></pre>
  <p>This is preeeeetty ugly.  What can we do about it?</p>