Use trim() instead of trimEnd().trimStart()
ProprietarySame as the inverse — trim() strips both ends in one pass without the intermediate String allocation.
org. openrewrite. kotlin. bestpractices. UseTrimForTrimEndThenTrimStart$KtRecipemod run . --recipe= 'org. openrewrite. kotlin. bestpractices. UseTrimForTrimEndThenTrimStart$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.