Skip to content

Instantly share code, notes, and snippets.

@dcampogiani
Created August 15, 2020 10:45
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/23ef44ae1ef274dca181d572cf6e733d to your computer and use it in GitHub Desktop.
Save dcampogiani/23ef44ae1ef274dca181d572cf6e733d to your computer and use it in GitHub Desktop.
private fun extractExpiration(lines: List<String>): Pair<String?, String?> {
val expirationLine = extractExpirationLine(lines)
val month = expirationLine?.substring(startIndex = 0, endIndex = 2)
val year = expirationLine?.substring(startIndex = 3)
return Pair(month, year)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment