Skip to content

Instantly share code, notes, and snippets.

@abhi21git
Created December 25, 2024 16:40
Show Gist options
  • Save abhi21git/484c4103450e572fed900daa18add712 to your computer and use it in GitHub Desktop.
Save abhi21git/484c4103450e572fed900daa18add712 to your computer and use it in GitHub Desktop.
extension String {
subscript(_ i: Int) -> Character {
self[index(startIndex, offsetBy: i)]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment