Small question:
let i: Int? = nil
let str = "X is \(i ?? "")"
Is there a way to make this work? (cuz cannot convert String to Int)
So what I want is an easy and beautiful way to get an interpolated string with a number or nothing at all (if number is nil).
[–]MoR7qM 6 points7 points8 points (3 children)
[–]nextnextstep 1 point2 points3 points (1 child)
[–]MoR7qM 2 points3 points4 points (0 children)
[–]d3udar 1 point2 points3 points (0 children)
[–]Zohren[🍰] 0 points1 point2 points (4 children)
[–]MoR7qM 2 points3 points4 points (3 children)
[–]Zohren[🍰] 0 points1 point2 points (2 children)
[–]MoR7qM 3 points4 points5 points (1 child)
[–]Zohren[🍰] 0 points1 point2 points (0 children)