aStringList.CommaText:=ListBox1.Items.CommaText; aList:=TStringList.Create; aList.LoadFromFile('keyWord.txt'); aStringList.CommaText:=aStringList.CommaText+','+ aList.CommaText; aList.Free; end;
// 设置为True会自动排序,设置为dupIgnore会忽略重复项 StringList1.Sorted := True; StringList1.Duplicates := dupIgnore;