So I have this Swift code:
func didReceiveResponse(response:String) {
...
let substr = response[11...]
By my interpretation, substr should be a Substring referencing all characters after index 11 in the response string.
What actually happens is this compiler error:
Cannot subscript a value of type 'String' with an index of type 'CountablePartialRangeFrom<Int>'
This seems like it should be obvious. What can I try next?
Stringis indexed byString.Index, notInt– see for example stackoverflow.com/q/39676939/2976878