Created
March 19, 2018 07:08
-
-
Save acalism/1b6fa79d9472900e53a40b8e88ff905e to your computer and use it in GitHub Desktop.
Basic Statements
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1. for 循环条件筛选 | |
let urlStrings: [String?] = ["https://baidu.com", nil, "https://im.qq.com"] | |
for case let urlString? in urlStrings where !urlString.isEmpty { | |
if let u = URL(string: url) { | |
print(u) | |
} | |
} | |
// 2. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment