Extract substring from string
returns the substring of
newStr = substr(
str that starts at the character
pos and is
long. Use zero-based indexing.
substr is supported only in Stateflow® charts that use C as the action language. In charts that use
MATLAB® as the action language, use
"world" from a longer string.
str = "Hello, world!"; newStr = substr(str,7,5);
Use zero-based indexing.
Enclose literal strings with single or double quotes.
Introduced in R2018b