Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let myURLArray: ([URL]) = [ URL(string: "https://www.google.fr")! ]
- let result = myURLArray.flatMap { $0.absoluteString }
- print(result)
- ["https://www.google.fr"]
- ["h", "t", "t", "p", "s", ":", "/", "/", "w", "w", "w", ".", "g", "o", "o", "g", "l", "e", ".", "f", "r"]
Add Comment
Please, Sign In to add comment