mustBeTextScalar
Validate that value is single piece of text
Syntax
Description
mustBeTextScalar( throws an error if
value)value is not a text scalar. A text scalar is a single piece of text,
but the definition varies by data type:
For string arrays, a single piece of text is a 1-by-1 scalar, such as
“text”. The empty string""and missing strings are special cases that also count as single pieces of text.For character arrays, a single piece of text is a row vector, such as
‘text’. An empty 0-by-0 char array''is a special case that also counts as a single piece of text.For scalar cells containing a string scalar or character vector
mustBeTextScalarthrows an error.
This function does not return a value.
Examples
Input Arguments
Extended Capabilities
Version History
Introduced in R2020b