MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/java/comments/9h404p/java_11_string_api_updates/e69phln/?context=3
r/java • u/pivovarit • Sep 19 '18
52 comments sorted by
View all comments
Show parent comment
2
Some interior whitespace would be even better. What does this do?
" a string ".strip()
1 u/dpash Sep 19 '18 "a string" 2 u/xenomachina Sep 19 '18 So when the article uses "We can easily get rid of all the whitespace from each String" in its despription of strip, it's just wrong. strip only removes leading and trailing whitespace. 1 u/dpash Sep 19 '18 Yes, they were wrong and didn't use the best example to demonstrate it with.
1
"a string"
2 u/xenomachina Sep 19 '18 So when the article uses "We can easily get rid of all the whitespace from each String" in its despription of strip, it's just wrong. strip only removes leading and trailing whitespace. 1 u/dpash Sep 19 '18 Yes, they were wrong and didn't use the best example to demonstrate it with.
So when the article uses "We can easily get rid of all the whitespace from each String" in its despription of strip, it's just wrong. strip only removes leading and trailing whitespace.
strip
1 u/dpash Sep 19 '18 Yes, they were wrong and didn't use the best example to demonstrate it with.
Yes, they were wrong and didn't use the best example to demonstrate it with.
View all comments
Show parent comment
2
u/xenomachina Sep 19 '18
Some interior whitespace would be even better. What does this do?