Main Content

ssGetInputStringLength

Get length of string from input port

Since R2020b

Syntax

size_t ssGetInputStringLength(SimStruct *S,int portIdx)

Arguments

S

SimStruct that represents an S-Function block.

portIdx

Port from which to get input string length.

Returns

A value of type size_T indicating the length of the input string.

Description

ssGetInputStringLength gets the length (size_t) of the input string.

Limitations

Non-inlined S-functions that contain string SimStruct functions do not run with rapid accelerator mode.

Languages

C, C++

Examples

This example gets the length of the input string.

...
   size_t u0len = ssGetInputStringLength(S, 0);
...

Version History

Introduced in R2020b