Simon Lin
01/05/2022, 6:58 AMval list = mutableListOf<String>()
list.add(0, "a")
list.add(0, "b")
list.toString() // except [b], actual [b, a]
gildor
01/05/2022, 7:04 AMgildor
01/05/2022, 7:04 AMSimon Lin
01/05/2022, 7:06 AMa
? If call list[0] = “a” will cause exceptionSimon Lin
01/05/2022, 7:07 AMgildor
01/05/2022, 7:10 AMgildor
01/05/2022, 7:12 AMgildor
01/05/2022, 7:13 AMSimon Lin
01/05/2022, 7:18 AMgildor
01/05/2022, 7:21 AMor selected the data that insert early and replace its value.I think no need to overthink this, it’s just easy to check if there is item and set it
Simon Lin
01/05/2022, 7:23 AMSimon Lin
01/05/2022, 7:26 AMThe INSERT OR REPLACE Statement.
gildor
01/05/2022, 7:57 AM