Skip to content

is_valid_identifier

miscellaneous · scripts/miscellaneous/is_valid_identifier.m

: tf = is_valid_identifier (name)

Return true when name is a valid identifier string.

A valid identifier starts with a letter or underscore and continues with letters, digits or underscores. Unlike isvarname, language keywords such as "for" are accepted.