I am building an application which incorporates the use of both firebase and parse,and for some reason i keep getting the fatal error: fatal error: subscript: subRange extends past String end
Not sure why i keep getting this ;/
I tried doing a search and found nothing. Thanks.
It's kinda similar to "Array index out of range", but for Strings.
let str = "qwertyui"
var str1 = "qwer" // length = 4
let ind = advance(str.startIndex, 6) //equals 6
str1[ind] //fatal error: subscript: subRange extends past String end
str1.removeAtIndex(ind) //fatal error: subscript: subRange extends past String end
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With