We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
To avoid the compiler error of subscript Range we have to use the following
let start = index(startIndex, offsetBy: r.lowerBound) let end = index(start, offsetBy: r.upperBound - r.lowerBound) let range: Range<Index> = start..<end return String(self[range]) }
Thanks.
The text was updated successfully, but these errors were encountered:
Regards! change the code for this and the problem is solved
subscript (r: Range<Int>) -> String { let start = self.index(startIndex, offsetBy: r.lowerBound) let end = self.index(start, offsetBy: r.upperBound - r.lowerBound) return String(self[start..<end]) }
Sorry, something went wrong.
Thank you! This was exactly the issue I was having.
No branches or pull requests
To avoid the compiler error of subscript Range we have to use the following
Thanks.
The text was updated successfully, but these errors were encountered: