Closed Daman1208 closed 7 years ago
Is there any option of conditional append?? e.g, append some variable if it is not nil
you have to make sure it's not optional. So if you want to append an optional string you will get code like this:
let s1: String? = "asdf" let s2: String? = "jkl" let a = (s1 ?? "").red.append(s2 ?? "").green
Is there any option of conditional append?? e.g, append some variable if it is not nil