Construct valid MATLAB identifiers from input strings
constructs
valid MATLAB® identifiers, N
= matlab.lang.makeValidName(S
)N
, from input character
vectors, S
. The makeValidName
function
does not guarantee the strings in N
are unique.
A valid MATLAB identifier is a character vector of alphanumerics
(A–Z, a–z, 0–9) and underscores, such that the
first character is a letter and the length of the character vector
is less than or equal to namelengthmax
.
makeValidName
deletes any whitespace characters
before replacing any characters that are not alphanumerics or underscores.
If a whitespace character is followed by a lowercase letter, makeValidName
converts
the letter to the corresponding uppercase character.
includes
additional options specified by one or more N
= matlab.lang.makeValidName(S
,Name,Value
)Name,Value
pair
arguments.
iskeyword
| isletter
| isvarname
| matlab.lang.makeUniqueStrings
| namelengthmax
| regexp
| regexprep
| strrep
| who