%% Determine if Character Vector Ends With Extension
% Create a character vector that contains the name of a file. Determine whether the name ends with specified extensions.

chr = 'MyLatestPaper.docx'

%

TF = endsWith(chr,'docx')

%

TF = endsWith(chr,'gz')

% Copyright 2012 The MathWorks, Inc.