Answer the question
In order to leave comments, you need to log in
How to access the index of a row? Swift 2?
Hello! How to access an element of a string? For example:
let text = "four score and seven years ago"
for var index = text.characters.count - 1; index != 0; index-- {
print(text.characters[index])
}
Answer the question
In order to leave comments, you need to log in
let text2 = "four score and seven years ago"
for var index = text2.characters.count - 1; index != 0; index-- {
var index2 = text2.startIndex.advancedBy(index)
print(text2[index2])
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question