Main Content

String Concatenate

Concatenate input strings to form one output string

  • Library:
  • Simulink / String

  • String Concatenate block

Description

The String Concatenate block concatenates multiple input strings, in order of their input, to form one output string. Use this block if you want to combine multiple strings into a single string.

Ports

Input

expand all

First input string, specified as a scalar.

Data Types: string

Second input string, specified as a scalar.

Data Types: string

Output

expand all

Concatenated string, specified as a scalar.

Data Types: string

Parameters

expand all

Number of input strings to concatenate, specified as a scalar. You can specify from 2 to 512 input ports.

Output data type, specified using the string data type to specify a string with no maximum length.

To specify a string data type with a maximum length, specify stringtype(N). For example, stringtype(128) creates a string data type with a maximum length of 128 characters.

Click the Show data type assistant button to display the Data Type Assistant, which helps you set the data type attributes. See Specify Data Types Using Data Type Assistant for more information.

Use the stringtype function, for example, stringtype(128).

Dependency

Clicking the Show data type assistant button enables this parameter.

Block Characteristics

Data Types

string

Direct Feedthrough

yes

Multidimensional Signals

no

Variable-Size Signals

no

Zero-Crossing Detection

no

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Introduced in R2018a