Great with a nice overview page - I always struggl...
# news
c
Great with a nice overview page - I always struggle scrolling up & down the file on GitHub 😆 — Have you discovered a difference between
IfNullOrWhiteSpace()
and
OrIfNullOrWhiteSpace()
?
a
Good shout, I didn't actually notice the similarities between the two given the gap in the class. But yeah there is virtually no difference between the two except one does "If empty then return default, otherwise return value" and the other does "If not empty then return value, otherwise return default"
c
Yeah, they were most probably added by two different developers :D
(
OrIfNullOrWhiteSpace()
reads very well in most of my code, so that's my choice)
a
Yeah more than likely to be different developers. Perhaps it could be refactored to use one or the other, but sounds like more effort than its worth. It does raise a good point though as to whether core should make one of these methods as obsolete and advise to use the other and remove it in future versions