Ok - I
think I get what you're asking
You have a List<item> FunctionList and a \s separated string of terms.
You want to find the matching FunctionList item for each term in the string.
I imagine that some part of the FunctionList is a string that matches the term?
If this is not correct then please comment and I will update or remove my answer!
string[] terms = mainString.split(' ');
foreach(string term in terms)
{
if(functionList.Contains(term)){}
var items = functionList.Where(f=>f.Name==term);
if(!items.Any()){continue;
else if(items.Count()>1) {break;
else{
Item item = items.Single();
item.DoSomething();
}
foreach(Item item in FunctionList){
if(item.Name = term)
{
item.DoSomething();
break;
}
}
}