Ion-exchange mechanism of layered transition-metal oxides: case study of LiNi(0.5)Mn(0.5)O₂.