Use replaceFirstChar { … } instead of capitalize()

Proprietary

String.capitalize() was deprecated in Kotlin 1.5 in favor of the locale-explicit replaceFirstChar { if (it.isLowerCase()) it.titlecase() else it.toString() }.

org.openrewrite.kotlin.migrate.UseCapitalize$KtRecipe
mod run . --recipe='org.openrewrite.kotlin.migrate.UseCapitalize$KtRecipe'

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.