NullableStringExt extension

Extension on nullable String providing utility methods for null and empty checks.

This extension adds convenient methods to work with nullable strings, simplifying common null and empty string checks.

on

Properties

hasValue bool

Available on String?, provided by the NullableStringExt extension

Returns true if this string is not null and not empty.
no setter
isNullOrEmpty bool

Available on String?, provided by the NullableStringExt extension

Returns true if this string is null or empty.
no setter

Methods

mapIfEmpty(String str) String

Available on String?, provided by the NullableStringExt extension

Returns this string if it has a value, otherwise returns the provided str.