Last active
December 11, 2020 03:04
-
-
Save stevenchou1130/f36a927a912707ec0578d1f24c77f321 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
extension String { | |
func versionToInt() -> [Int] { | |
return self.components(separatedBy: ".").map { Int.init($0) ?? 0 } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment