Swift 4 string length methods
This commit is contained in:
@@ -20,7 +20,7 @@ extension URL
|
||||
|
||||
for paramPair in parameterComponents {
|
||||
let kvPair = paramPair.components(separatedBy: "=")
|
||||
if (kvPair.count == 2 && kvPair[0].characters.count > 0) {
|
||||
if (kvPair.count == 2 && kvPair[0].count > 0) {
|
||||
let key = kvPair[0].removingPercentEncoding!
|
||||
let value = kvPair[1].removingPercentEncoding!
|
||||
dict[key] = value
|
||||
@@ -37,7 +37,7 @@ extension URL
|
||||
|
||||
for (key, value) in params {
|
||||
var delim = ""
|
||||
if (paramsString.characters.count == 0) {
|
||||
if (paramsString.count == 0) {
|
||||
delim = "?"
|
||||
} else {
|
||||
delim = "&"
|
||||
|
||||
Reference in New Issue
Block a user