Skip to content

Instantly share code, notes, and snippets.

@dcampogiani
Created August 15, 2020 10:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dcampogiani/4eae9a66f18ae039991bd8368479846f to your computer and use it in GitHub Desktop.
Save dcampogiani/4eae9a66f18ae039991bd8368479846f to your computer and use it in GitHub Desktop.
private fun extractOwner(lines: List<String>): String? {
return lines
.filter { it.contains(" ") }
.filter { line -> line.asIterable().none { char -> char.isDigit() } }
.maxBy { it.length }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment