TF = strncmpi(string,string,n) compares
the first n characters of two strings for equality,
ignoring any differences in letter case. The function returns a scalar
logical 1 for equality, or scalar logical 0 for inequality.

TF = strncmpi(string,cellstr,n) compares
the first n characters of a string with the first n characters
of each element of a cell array of strings, ignoring letter case.
The function returns a logical array the same size as the cellstr input
in which logical 1 represents equality. The order of the input arguments
is not important.

TF = strncmpi(cellstr,cellstr,n) compares
each element of one cell array of strings with the same element of
the other, ignoring letter case. strncmpi attempts
to match only the first n characters of these strings.
The function returns a logical array the same size as either input
array.

Input Arguments

string

A single character string or n-by-1 array of strings.

cellstr

A cell array of strings.

n

Maximum number of characters to compare. Must be a scalar, integer-valued
double.

Output Arguments

TF

When both inputs are character arrays, TF is
a scalar logical value. This value is logical 1 (true)
if the size and content of both arrays are equal, and logical 0 (false)
if they are not.

When either or both inputs are a cell array of strings, TF is
an array of logical ones and zeros. This array is the same size as
the input cell array(s), and contains logical 1 (true)
for those elements of the input arrays that are a match, and logical
0 (false) for those elements that are not.

Examples

From a list of 10 MATLAB^{®} functions, find those that apply
to using a camera. Do the comparison without sensitivity to letter
case: