Created
October 23, 2020 15:00
-
-
Save tkausch/081d619133e95c0bd4ff0f903f44ff83 to your computer and use it in GitHub Desktop.
How to read single letter in a string
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
extension String { | |
subscript(i: Int) -> String { | |
return String(self[index(startIndex, offsetBy: i)]) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment