%MATCHES True if pattern is equal to the text.
%   TF = MATCHES(STR,PAT) returns 1 (true) if STR is equal to PAT,
%   and returns 0 (false) otherwise.
%
%   STR must be text, which means it can be a string array, a character
%   vector, or a cell array of character vectors. PAT can be text or a
%   pattern array. PAT and STR need not have the same size. MATCHES returns 
%   true  if it finds any element of PAT that matches STR. If STR is a string 
%   array or cell array, then TF is a logical array that is the same size.
% 
%   TF = MATCHES(STR,PAT,'IgnoreCase',IGNORE) ignores case when comparing 
%   STR and PAT if IGNORE is true. The default value of IGNORE is false.
% 
%   Examples:
%       STR = "data.tar.gz";
%       PAT = "data.tar.gz";
%       matches(STR,PAT)
%
%       % returns  1
%
%       STR = ["abstracts.docx","data.tar.gz"];
%       PAT = 'data.tar.gz';         
%       matches(STR,PAT)
%
%       % returns  [0 1]
%
%       STR = ["abstracts.docx","data.tar.gz"];
%       PAT = lettersPattern + "." + lettersPattern;
%       matches(STR,PAT)
%
%       % returns  [1 0]
%
%       STR = 'data.tar.gz';
%       PAT = {'abstracts.docx','data.tar.gz'};
%       matches(STR,PAT)
%
%       % returns  1
%
%       STR ={'DATA.TAR.GZ','SUMMARY.PPT'};
%       PAT = "data.tar.gz";
%       matches(STR,PAT,'IgnoreCase',true)
%
%       % returns  [1 0]
%
%   See also contains, count, endsWith, startsWith, pattern, lettersPattern

%   Copyright 2018-2020 The MathWorks, Inc.
