I'm trying to combine a string and a variable into a variable to use in a API request.
Here is the code I am using:
let urlString = ("example.com/api/balance/", addr)
guard let url = URL(string: urlString) else { return }
The variable urlString needs to be set to example.com/api/balance/addr
Xcode 9 is giving me the error Cannot convert value of type '(String, String)' to expected argument type 'String'
How would I make the string and the variable into one string?
I am using Xcode 9 with Swift4
let urlString = "example.com/api/balance/" + "addr"example.com/api/balance/addrand what I posted returns that result. if addr is a variable of type string then it would belet urlString = "example.com/api/balance/" + addr