dash.assert.strlist

Throw error if input is not a string vector, cellstring vector, or char row vector


Syntax



Description

list = dash.assert.strlist(input)

Checks if input is a string vector, cellstring vector, or char row vector. If so, returns the input as a string vector. If not, throws an error.

list = dash.assert.strlist(input, name)

Use a custom name to refer to variable in the error message.

list = dash.assert.strlist(input, name, idHeader)

Use a custom header for thrown error IDs.


Input Arguments

input

any data type
The input being tested

name

string scalar
The name of the input in the calling function. Default is “input”

idHeader

string scalar
A header for thrown error IDs. Default is “DASH:assert:strlist”

Output Arguments

list

string vector
The input converted to string data type