7 lines
232 B
Plaintext
Vendored
7 lines
232 B
Plaintext
Vendored
// WITH_RUNTIME
|
|
fun foo(list: List<String>) {
|
|
<caret>val result: String? = list.firstOrNull { // search for first non-empty string in the list
|
|
it.length > 0
|
|
}// string should be non-empty
|
|
// save it into result
|
|
} |