strncmp
Description
compares the first tf
= strncmp(str1
,str2
,n
)n
characters of str1
and
str2
. The operator returns 1
(true
) if the strings are identical and 0
(false
) otherwise.
Note
The operator strncmp
is not supported in Stateflow® charts that use C as the action language. For similar functionality, use
strcmp
.
Examples
Input Arguments
Limitations
This operator does not support the use of Stateflow structure fields. For more information about structures in Stateflow, see Access Bus Signals Through Stateflow Structures.
Version History
Introduced in R2021b