Right now I have some code that looks like the following:
let msg: String? = myStr.removingPercentEncoding ?? nil
print("msg \(msg!)")
I really don't like the use of !
in msg!
as that can possibly throw an exception, I believe.
What's the best way to call myStr.removingPercentEncoding
if myStr is not nil and then unwrap msg without throwing an exception?