strcmp
Compare strings for equality (case-sensitive).
Syntax
Section titled “Syntax”tf = strcmp(str1, str2)Description
Section titled “Description”Returns true when str1 and str2 are identical (including case), false otherwise. With cell-array inputs, compares element-wise.
Examples
Section titled “Examples”strcmp('abc', 'abc') % 1strcmp('abc', 'ABC') % 0strcmp({'foo','bar'}, {'foo','baz'}) % [1 0]