- •127 Codes are ascii). The actual characters displayed depends on the
- •String operations
- •In expression, patterns are specified using combinations of metacharacters
- •In expression, patterns are specified using combinations of metacharacters
- •In arrays s1, s2, ..., sn. Inputs can be combinations of single
- •Is the same size as c1 or c2, and contains logical 1 (true) for those
- •Input c is a cell array of strings. The function returns tf, a logical
- •Is the same size as c1 or c2, and contains logical 1 (true) for those
- •Input c is a cell array of strings. The function returns tf, a logical
- •Version of the character array s.
- •Input parameters:
- •Character set conversion
- •Is unspecified or is the empty string (''), matlab's default
- •If you apply an integer or string conversion to a numeric value that
- •Xregtable/sprintf
- •Base number conversion
- •If s is a character array, each row is interpreted as a base b string.
Input c is a cell array of strings. The function returns tf, a logical
array that is the same size as C and contains logical 1 (true) for those
elements of C that are a match, and logical 0 (false) for those elements
that are not. The order of the two input arguments is not important.
TF = STRNCMP(C1,C2,N) performs a case-sensitive comparison between the
first N characters of each element of cell array C1 and the first N
characters of the same element in cell array C2. Inputs C1 and C2 are
equal-size cell arrays of strings. Input C1 and/or C2 can also be a
character array having the same number of rows as there are cells in the
cell array. The function returns TF, a logical array that is the same size
as C1 or C2, and contains logical 1 (true) for those elements of C1 and C2
that are a match, and logical 0 (false) for those elements that are not.
When one of the inputs is a cell array, scalar expansion will occur as
needed.
STRNCMP supports international character sets.
See also strcmp, strcmpi, strncmpi, regexp.
Overloaded methods:
opaque/strncmp
Reference page in Help browser
doc strncmp
<strcmpi> - Compare strings ignoring case.
STRCMPI Compare strings ignoring case.
TF = STRCMPI(S1,S2) compares the strings S1 and S2 and returns logical 1
(true) if they are the same except for case, and returns logical 0 (false)
otherwise.
TF = STRCMPI(S,C), compares string S to each element of cell array C,
where S is a character vector (or a 1-by-1 cell array) and C is a cell
array of strings. The function returns TF, a logical array that is the
same size as C and contains logical 1 (true) for those elements of C
that are a match, except for case, and logical 0 (false) for those elements
that are not. The order of the two input arguments is not important.
TF = STRCMPI(C1,C2) compares each element of C1 to the same element in C2,
where C1 and C2 are equal-size cell arrays of strings. Input C1 and/or C2
can also be a character array having the number of rows as there are
cells in the cell array. The function returns TF, a logical array that
Is the same size as c1 or c2, and contains logical 1 (true) for those
elements of C1 and C2 that are a match, except for case, and logical 0
(false) for those elements that are not.
When one of the inputs is a cell array, scalar expansion occurs as
needed.
STRCMPI supports international character sets.
See also strcmp, strncmp, strncmpi, regexpi.
Overloaded methods:
opaque/strcmpi
Reference page in Help browser
doc strcmpi
<strncmpi> - Compare first N characters of strings ignoring case.
STRNCMPI Compare first N characters of strings ignoring case.
TF = STRNCMPI(S1,S2,N) performs a case-insensitive comparison between the
first N characters of strings S1 and S2. The function returns logical 1
(true) if they are the same except for letter case, and returns logical 0
(false) otherwise.
TF = STRNCMPI(S,C,N) performs a case-insensitive comparison between the
first N characters of string S and the first N characters in each element
of cell array C. Input S is a character vector (or 1-by-1 cell array), and