Method Reference: string.ismissing

string: TF = ismissing (str)
string: TF = ismissing (str, indicator)

Find missing elements in string array.

TF = ismissing (str) returns a logical array, TF, with any true values corresponding to missing elements in the input string array str.

TF = ismissing (str, indicator) also returns a logical array, TF, with any true values corresponding to elements in the input string array str, which are lexicographically equal to the values in indicator.

indicator must be either a character vector or a string vector or a cell vector of character vectors.

The output array TF has the same size as the input array str.

Source Code: string

Example: 1

ismissing flags the <missing> elements — the string form of missing data, distinct from an empty string "".

 s = string ({'a'; 'b'; 'c'});
 s(2) = string (missing);
 s
s =
  3x1 string array

    "a"          
    <missing>    
    "c"
 ismissing (s)
ans =

  0
  1
  0