strncmp.m

来自「matlab6.5」· M 代码 · 共 20 行

M
20
字号
%STRNCMP Compare first N characters of strings.
%   STRNCMP(S1,S2,N) returns 1 if the first N characters of
%   the strings S1 and S2 are the same and 0 otherwise.
%
%   TF = STRNCMP(S,T,N), when either S or T is a cell array of strings,
%   returns an array the same size as S and T containing 1 for those
%   elements of S and T that match (up to N characters), and 0
%   otherwise.  S and T must be the same size (or one can be a scalar
%   cell).  Either one can also be a character array with the
%   right number of rows.
%
%   STRNCMP supports international character sets.
%
%   See also STRCMP, STRNCMPI, FINDSTR, STRMATCH.

%   Copyright 1984-2002 The MathWorks, Inc. 
%   $Revision: 1.16 $  $Date: 2002/04/09 00:33:38 $
%   Built-in function.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?