String Contains, String Starts With, String Ends With
R2026bDetermine if string contains, starts with, or ends with pattern
Libraries:
Simulink /
String
Description
The String Contains, String Starts With, and String Ends With blocks determine if a string (str) contains, starts with, or ends with a pattern (sub).
The String Contains, String Starts With, and String
Ends With blocks are identical. When Function is set to
Contains, the block determines if the string contains a specified
pattern. When Function is set to Starts with,
the block determines if the string starts with a specified pattern. When
Function is set to Ends with, the block
determines if the string ends with a specified pattern.
Ports
Input
Output
Parameters
Block Characteristics
Data Types |
|
Direct Feedthrough |
|
Multidimensional Signals |
|
Variable-Size Signals |
|
Zero-Crossing Detection |
|
Programmatic Use: Add Block
To add the block programmatically, use the add_block function with one of these library block paths as the source.
"simulink/String/String Contains"
Example: add_block("simulink/String/String Contains","myModel/myBlock",MakeNameUnique="on")
Extended Capabilities
Version History
Introduced in R2020a
See Also
ASCII to String | Compose String | Scan String | String Concatenate | String Count | String Find | String Length | String to Double | String to Single | String to Enum | String to ASCII | Substring | To String