Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

mustBeNonzeroLengthText

Checks that value is text with nonzero length or raise an error.

Syntax

  • mustBeNonzeroLengthText(var)
  • mustBeNonzeroLengthText(var, argPosition)
  • C++: void mustBeNonzeroLengthText(const ArrayOfVector& args, int argPosition)

Input argument

  • var - a variable: a string array, a cell of strings, or row vector characters array.
  • argPosition - a positive integer value: Position of input argument.

Description

mustBeNonzeroLengthText checks that value is text with nonzero length or raise an error.

Example

mustBeNonzeroLengthText('true')
mustBeNonzeroLengthText("hello")
mustBeNonzeroLengthText('')

See also

ischar, isstring.

History

VersionDescription
1.0.0initial version

Author

Allan CORNET