Skip to content

Instantly share code, notes, and snippets.

@haranicle
Last active July 2, 2017 08:35
Show Gist options
  • Save haranicle/3d1d31d0e0f6ad6e49ff97a3e859cabe to your computer and use it in GitHub Desktop.
Save haranicle/3d1d31d0e0f6ad6e49ff97a3e859cabe to your computer and use it in GitHub Desktop.
split NSString
var str: NSString = "abcdef"
for i in 0..<str.length {
print(str.substring(with: NSRange(location: i, length: 1)))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment