Is there a way to check strings for nil and \"\" in Swift? In Rails, I can use blank() to check.
nil
\"\"
blank()
I currently have this, but i
You could perhaps use the if-let-where clause:
Swift 3:
if let string = string, !string.isEmpty { /* string is not blank */ }
Swift 2:
if let string = string where !string.isEmpty { /* string is not blank */ }