function IDs = utFindObjectsByName(allIDs, name)
% UTFINDOBJECTSBYNAME Returns a subset of identifier objects in ALLIDS with
% a full name that begins with NAME.
%
% ALLIDS is an array of @VariableID objects.
% NAME   is a (partial) full name of the objects.

% Copyright 2000-2023 The MathWorks, Inc.

IDs = [];

for ct = 1:length(allIDs)
    h = allIDs(ct);

    if strmatch( name, h.getFullName )
        IDs = [IDs; h]; %#ok<AGROW>
    end
end
end

% LocalWords:  ALLIDS
