nonEmptyFirst
Returns the first argument of supported type that exists and is non empty. A String is non empty if it contains any non-whitespace character. A list
or map
is non empty if their length
> 0.
nonEmptyFirst(...args)
# Or
nonEmptyFirst(listOfValues)
#
Parametersargs
: A supported value argumentlistOfValues
:list
containing values of supported types
#
Returns- First non empty value
#
ExampleassertTrue(nonEmptyFirst({}, [], 32) == 32)