Construct unique strings from input strings
U = matlab.lang.makeUniqueStrings(
constructs
character vectors that are unique within S
,excludedStrings
)U
and
with respect to excludedStrings
. The makeUniqueStrings
function
does not check excludedStrings
for uniqueness.
U = matlab.lang.makeUniqueStrings(
specifies
the subset of S
,whichStringsIdx
)S
to make unique within the entire
set. makeUniqueStrings
makes the character vectors
in S(whichStringsIdx)
unique among themselves and
with respect to the remaining character vectors. makeUniqueStrings
returns
the remaining character vectors unmodified in U
.
Use this syntax when you have an array of character vectors, and need
to check that only some elements of the array are unique.
U = matlab.lang.makeUniqueStrings(
specifies
the maximum length, S
,___, maxStringLength
)maxStringLength
, of character
vectors in U
. If makeUniqueStrings
cannot
make elements in S
unique without exceeding maxStringLength
,
it returns an error. You can use this syntax with any of the input
arguments of the previous syntaxes.