Which characters are replaced by matlab.lang.makeValidName?
Function matlab.lang.makeValidName does 2 things:
first, it checks the input string for special characters which are not allowed to be contained in identifiers and replaces those (e.g. with "")
second, it checks the length of the input string with possibly replaced characters, and if is too long, it truncates the string.
However, I would like the function to check only for special characters, not for length.
One option would be to use "strrep", but then I would like to generate the list of characters which are replaced by matlab.lang.makeValidName to be consistent with makeValidName.Function matlab.lang.makeValidName does 2 things:
first, it checks the input string for special characters which are not allowed to be contained in identifiers and replaces those (e.g. with "")
second, it checks the length of the input string with possibly replaced characters, and if is too long, it truncates the string.
However, I would like the function to check only for special characters, not for length.
One option would be to use "strrep", but then I would like to generate the list of characters which are replaced by matlab.lang.makeValidName to be consistent with makeValidName. Function matlab.lang.makeValidName does 2 things:
first, it checks the input string for special characters which are not allowed to be contained in identifiers and replaces those (e.g. with "")
second, it checks the length of the input string with possibly replaced characters, and if is too long, it truncates the string.
However, I would like the function to check only for special characters, not for length.
One option would be to use "strrep", but then I would like to generate the list of characters which are replaced by matlab.lang.makeValidName to be consistent with makeValidName. matlab.lang.makevalidname MATLAB Answers — New Questions