markdown guide
 

Uhhh...

string = string.replace(β€œ β€œ, β€œ%20”)

Or if you wanna go all in:

from urllib.parse import quote
string = quote(string)

(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 πŸ˜¬πŸ™ƒ)

Classic DEV Post from May 29

Is generalization killing creativity in the software industry?

As software gets more and more integrated into our lives, the industrialization of its crafting process becomes inevitable. But the over-generalization of software engineering can be crushing the creative side of programming.

creator profile image
interactive experiences which augment perspective. iOS and AR Engineer