%STARTSWITH True if text starts with pattern.
%   TF = STARTSWITH(STR,PAT) returns 1 (true) if STR starts with 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. STARTSWITH returns 
%   true if it finds any element of PAT at the start of STR. If STR is a 
%   string array or cell array, then TF is a logical array that is the same size.
%
%   TF = STARTSWITH(STR,PAT,'IgnoreCase',IGNORE) ignores case when searching 
%   for PAT at the start of STR if IGNORE is true. The default value of IGNORE 
%   is false.
%
%   Examples:
%       STR = "data.tar.gz";
%       PAT = "data";
%       startsWith(STR,PAT)
%
%       % returns  1
%
%       STR = ["abstracts.docx","data.tar.gz"];
%       PAT = 'data';         
%       startsWith(STR,PAT)
%
%       % returns  [0 1]
%
%       STR = ["abc","123"];
%       PAT = lettersPattern;         
%       contains(STR,PAT)
%
%       % returns  [1 0]
%
%       STR = "data.tar.gz";
%       PAT = {'abc','data'};
%       startsWith(STR,PAT)
%
%       % returns  1
%
%       STR = {'DATA.TAR.GZ','SUMMARY.PPT'};
%       PAT = "data";
%       startsWith(STR,PAT,'IgnoreCase',true)
%
%       % returns  [1 0]
%
%   See also endsWith, contains, pattern, lettersPattern

%   Copyright 2015-2020 The MathWorks, Inc.
