FUNCTION REFERENCE

validatestring

Check text against a list of valid texts.

Check text against a list of valid texts.

Syntax

validStr = validatestring(str, validStrings)

Syntax

validStr = validatestring(str, validStrings, funcName, varName, argIndex)

Returns the element of validStrings that str matches, ignoring case. str

may be the start of the valid text. When it starts several of them, the

shortest is returned if it starts all the others; otherwise it is an error.

Example

validatestring('app', {'apple', 'banana'})   % 'apple'

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.