l = strcmp('str1','str2')
l = strcmp('str1','str2')
compares the strings str1
and str2
and returns 1 if the two are identical, and 0 otherwise. Note that the value returned by strcmp
is not the same as the C language convention.
strcmp
is case sensitive; any leading and trailing blanks in either of the strings are explicitly included in the comparison.
strcmp('Yes','No') =
0
strcmp('Yes','Yes') =
1
isstr
,lower
,setstr
,upper
(c) Copyright 1994 by The MathWorks, Inc.