Created
August 15, 2020 10:41
-
-
Save dcampogiani/da5ea7ce965c3d9d94fd22326ec34534 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private fun extractNumber(lines: List<String>): String? { | |
return lines.firstOrNull { line -> | |
val subNumbers = line.split(" ") | |
subNumbers.isNotEmpty() && subNumbers.flatMap { it.asIterable() }.all { it.isDigit() } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment