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.
Contact Me
- Patreon
- Indie Hacker
- Blog
- Twitter @saganone1
- Medium
- Codementor.io
- Sagan.one
- Quora
- GitHub
- Dev.to
- Youtube
If you liked this post, you may also enjoy
IB Designables – Failed to render and update auto layout status
Written on August 26, 2018