%% Determine If Character Vector Contains Substrings
% Create a character vector that contains a list of foods. Determine if the names of different foods are in the character vector.

chr = 'peppers, onions, and mushrooms';
TF = contains(chr,'onion')

%

TF = contains(chr,'pineapples')

% Copyright 2012-2020 The MathWorks, Inc.