Next: , Previous: , Up: API Alphabetically   [Contents]

8.2.31 mustBeCharvec

Function File: x = mustBeCharvec (x, label)

Requires that input is a char row vector.

Raises an error if the input x is not a row vector of chars. char row vectors are Octave’s normal representation of single strings. (They are what are produced by '...' string literals.) As a special case, 0-by-0 empty chars (what is produced by the string literal '') are also considered charvecs.

This does not differentiate between single-quoted and double-quoted strings.

label is an optional input that determines how the input will be described in error messages. If not supplied, inputname (1) is used, and if that is empty, it falls back to "input".