Skip to content

Instantly share code, notes, and snippets.

@windmaomao
Last active September 18, 2020 17:38
Show Gist options
  • Save windmaomao/608f693b4f0d1505b66f0258efbc066a to your computer and use it in GitHub Desktop.
Save windmaomao/608f693b4f0d1505b66f0258efbc066a to your computer and use it in GitHub Desktop.
Extract operations from a string
// Extract operation list from a string
fun extractOps(s: String): List<Int> = s
.map { charValue(it) }
.toList()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment