Use trim() instead of trimStart().trimEnd()
Proprietarytrim() strips whitespace from both ends in a single pass with no intermediate allocation. trimStart().trimEnd() builds a temporary String for the left-trimmed value before the second pass.
org. openrewrite. kotlin. bestpractices. UseTrimForTrimStartThenTrimEnd$KtRecipemod run . --recipe= 'org. openrewrite. kotlin. bestpractices. UseTrimForTrimStartThenTrimEnd$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.