Main Content

strcat

Concatenate strings

Description

newStr = strcat(str1,...,strN) concatenates strings str1,...,strN.

example

Note

The operator strcat is supported only in Stateflow® charts that use C as the action language. In charts that use MATLAB® as the action language, use plus.

Examples

expand all

Concatenate strings to form "Hello, world!".

str1 = "Hello, ";
str2 = "world!";
newStr = strcat(str1,str2);

Stateflow chart that uses the strcat operator in a state.

Tips

Enclose literal strings with single or double quotes.

Version History

Introduced in R2018b