Amazing Solution to Common Swift String Problem
For the longest time I have wondered how to handle String optionals in Swift. There is an odd conundrum when it comes to Strings. They could be nil, but they could also be empty string “”.
Handling empty optional strings in Swift has a great solution to this. And better, the comments section offers some alternatives that really get you thinking about Swift and optionals.
- Indie Hacker
- Twitter @saganone1