|
When I remove
So why we should remove the new line |
|
Are you sure you don't see any difference? Not even a subtle one? Here's what mine looks like with And here's what it looks like without See the subtle difference? And in the console, with And without Here you can see there's an extra line after the non-trimmed version. |
|
It is interesting, in your simulator screenshot, I could see the last line is different in horizontal alignment. And there is an external line in console. However I couldn't see those two difference in my side. Below is what I got. Here is the log in console: And in simulator without with The code:
|
|
Well, I can't see your images, but when I paste your That blank line between the two groups is the extra And I don't see the baseline discrepancy in the simulator because your code trims the string before assigning it to
But if I comment out the call to So I'm a little confused what the issue here is. Maybe if I could see your screenshots I might understand better. |
|
Well, there is another print under the for loop as I want to see the result withTrim and withoutTrim. I could see it in console it has two string printed out there. I could see the screenshot from here and don't know why you cannot see it. WithTrim:
WithoutTrim:
|
SPONSORED Join a FREE crash course for mid/senior iOS devs who want to achieve an expert level of technical and practical skills – it’s the fast track to being a complete senior developer! Hurry up because it'll be available only until February 9th.
Sponsor Hacking with Swift and reach the world's largest Swift community!
This topic has been closed due to inactivity, so you can't reply. Please create a new topic if you need to.
All interactions here are governed by our code of conduct.
Link copied to your pasteboard.