THE TEAL PICKLE CODING CHALLENGE!! Replace all spaces on a string with ‘%20'. I solved this problem with my lover, Swift. TRY IT 👀
![Cover image for [Swift CODE] URLify](https://res.cloudinary.com/practicaldev/image/fetch/s--VwXdGB6b--/c_imagga_scale,f_auto,fl_progressive,h_420,q_auto,w_1000/https://thepracticaldev.s3.amazonaws.com/i/tm540dsurl8m7xe9tykv.png)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
For further actions, you may consider blocking this person and/or reporting abuse
Wilson K. KOMLAN -
Gabriel_Silvestre -
Sidharth Mohanty -
Ahmad Adillaumam -
Once suspended, thetealpickle will not be able to comment or publish posts until their suspension is removed.
Once unsuspended, thetealpickle will be able to comment and publish posts again.
Once unpublished, all posts by thetealpickle will become hidden and only accessible to themselves.
If thetealpickle is not suspended, they can still re-publish their posts from their dashboard.
Discussion (2)
Uhhh...
Or if you wanna go all in:
(Snippets are in Python because I don’t know Swift)
Yeah in Swift 5 the syntax is pretty similar
string.replaceOccurrences(of: “ “, with: “%20”)
In everyday practice, I def use that method.
Typically in interviews, interviewers want to see whether the interviewee understands/can derive the algorithm which makes that method work (hence, all the code 😬🙃)