have a `var data: List<String>` how i can se...
# random
m
have a
var data: List<String>
how i can set it negative values in this list?
k
#getting-started
What exactly is your question though? You have a list of `String`s, so you can put in any
String
.
m
for example: i set some values in my list like this
item.data = listOf("guid1", "guid2")
but I need to determine when the list size is negative, something like item.data = item.data.size - 1
k
List.size
is never negative if that's what you're asking.
m
that is example of my implementation when list.size is not negative: listOf("guid") but my question was how to make the list negative. This I want to test in the tests
k
This does never happen. The size of a list is never negative. What would that even mean? A list with
-1
items in it?