LeoColman
12/10/2019, 8:41 PMString?.isNullOrBlank()
but there is no String?.isNotNullOrBlank()
while there is a String.isBlank()
and String.isNotBlank()
Anders Oedlund
12/10/2019, 8:54 PMString?.isNotNullButBlank()
LeoColman
12/10/2019, 9:02 PMisNotNullNorBlank
LeoColman
12/10/2019, 9:03 PMAnders Oedlund
12/10/2019, 9:04 PM!nullableStringVariable.isNullOrBlank()
does what (I assume) you are trying to doShawn
12/10/2019, 10:46 PMif (maybeString?.isBlank() == false)
wasyl
12/11/2019, 7:32 AM!isNullOrBlank()
, it’s pretty common requirement and negating manually is equally confusing to isNotNullNorBlank
wasyl
12/11/2019, 7:33 AMhas[NonWhitespace]Content
or something similarmiha-x64
12/11/2019, 8:14 AM.neitherNullNorBlank()
nkiesel
12/16/2019, 8:16 PMhasContent
and noContent
with an optional type-specific trim
parameter (e.g. for String if trim
is true
then hasContent
is s != null && !s.trim().isEmpty
)