%function [firsti,alli] = indexof(list,str)
% c is a padded string array or cell string
function [firsti,alli] = indexof(c,str)

firsti = 0;
alli = [];
str = lower(str);
if ~iscell(c), c = cellstr(c); end
for i=1:length(c),
	if strcmp(c(i,:),str),
		if firsti == 0, firsti = i; end
		alli = [alli i];
	end
end