-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Fix trimming #11666
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix trimming #11666
Conversation
The trim() method returns a new trimmed string, it does not alter the current string (strings being immutable in Java).
CLA assistant check
All committers have signed the CLA.
@abimarank
abimarank
Nov 29, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since Java 8 is supported, we can use like below
import java.util.Arrays;
Arrays.parallelSetAll(strArray, (i) -> strArray[i].trim());
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea. Sadly I have deleted my fork so I can't modify this PR. I'll close it and submit a new one (#11710). Sorry for the inconvenience.
Superseded by #11710
Uh oh!
There was an error while loading. Please reload this page.
The trim() method returns a new trimmed string, it does not alter the current string (strings being immutable in Java).
All Submissions:
New Feature Submissions:
Changes to Core Features: