Let’s say I have 2 nullable strings: `a` and `b`. ...
# announcements
w
Let’s say I have 2 nullable strings:
a
and
b
. I want to check if they are both
null
or
empty
or if not, then if they are equal, i.e., if
a = "" || a?.isEmpty()
and
b = null || b.isEmpty()
or
a == b
then I want to return true. Simply doing
a == b
won’t work for
a = ""
and
b = null
case. What’s the cleanest way to express this?