strcat - Concatenate strings - MATLAB (original) (raw)

Concatenate strings

expand all in page

Syntax

[newStr = strcat(str1,...,strN)](#d126e19390)

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

See Also

substr | plus

Topics