Use isBlank() instead of trim().isEmpty() on a String

Proprietary

trim().isEmpty() allocates a trimmed copy just to check whether the result has no characters. isBlank() answers the same question by scanning in place.

org.openrewrite.kotlin.stdlib.UseStringIsBlankForTrimIsEmpty$KtRecipe
mod run . --recipe='org.openrewrite.kotlin.stdlib.UseStringIsBlankForTrimIsEmpty$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.