Kotlin check if Collection is neither null nor empty

前端 未结 0 1632
予麋鹿
予麋鹿 2020-12-18 00:36

Right now, I am using the following function to do this check

if(list.isNullOrEmpty().not()) {
  doSomething()
} else {
  dont()
}

To me, I f

相关标签:
回答
  • 消灭零回复
提交回复
热议问题