Determine whether array is empty
To determine whether a string array has empty strings (string elements with zero
characters), use the ==
operator. For example, if
str
is a string containing zero characters, then str ==
""
returns logical 1
(true
). For more
information on testing empty strings, see Test for Empty Strings and Missing Values. For
information on string comparison, see Compare Text.
To test for missing values in an array, use the ismissing
function.