공부 (@Deprecated)
[kotlin] if not in (!in)
승가비
2022. 8. 11. 00:23
728x90
https://stackoverflow.com/questions/43664110/kotlin-if-item-not-in-list-proper-syntax
Kotlin: "if item not in list" proper syntax
Given Kotlin's list lookup syntax, if (x in myList) as opposed to idiomatic Java, if (myList.contains(x)) how can one express negation? The compiler doesn't like either of these: if (x not in
stackoverflow.com
728x90