I want to check a String to see if it contains a single letter. Here's the code:
func CheckLetter(letter:String,word:String) -> String{
var checkFlag = false
var tempWord = [""]
for n in 0...(word.count-1){
if tempWord[n] == letter[0]{
}
}
}
And the error is: 'subscript(_:)' is unavailable: cannot subscript String with an Int, use a String.Index instead.