String Length

Output number of characters in input string

  • Library:
  • Simulink / String

Description

The String Length block outputs the number of characters in the input string. For example, you can use the String Length block to move focus of attention to a particular location in a string.

Ports

Input

expand all

Input string, specified as a scalar.

Data Types: string

Output

expand all

Number of characters in the input string, specified as a scalar.

Data Types: uint32

Block Characteristics

Data Types

integer | 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