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
go version
go version go1.10.3 darwin/amd64
Yes
https://play.golang.org/p/SGSiTfrzD3P
We should expect a range of 37, as there are 37 characters in the string.
A range of 38, the special characters, in this case 'Ñ' make the indexes step further
The text was updated successfully, but these errors were encountered:
I think it's intended, see https://blog.golang.org/strings
Sorry, something went wrong.
This is not a bug:
https://golang.org/ref/spec#String_types https://golang.org/ref/spec#For_statements (see the bit about range clauses, specifically for strings)
No branches or pull requests
What version of Go are you using (
go version
)?go version go1.10.3 darwin/amd64
Does this issue reproduce with the latest release?
Yes
What did you do?
https://play.golang.org/p/SGSiTfrzD3P
What did you expect to see?
We should expect a range of 37, as there are 37 characters in the string.
What did you see instead?
A range of 38, the special characters, in this case 'Ñ' make the indexes step further
The text was updated successfully, but these errors were encountered: