{
IndexOfName, Count, Names, Strings example
The following example updates the strings in a list box given the strings contained in another list box. If a string in the source list box has the form Name=Value and the destination list box contains a string with the same Name part, the Value part in the destination list box will be replaced by the source’s value.
} 
procedure MergeStrings(Dest, Source: TStrings);
var
  I, DI: Integer;
  begin
  for I := 0 to Source.Count - 1 do
  begin
    if Pos ('=', Source[I]) > 1 then
    begin
      DI := Dest.IndexOfName(Source.Names[I]);
      if DI > -1 then Dest[DI] := Source[I];
    end;
  end;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  MergeStrings(ListBox1.Items,ListBox2.Items);
end; 
