Fix typo in 19-strings-runes-bytes-04-02
This commit is contained in:
committed by
İnanç Gümüş
parent
c3fd981de3
commit
a5fc35f0d5
@ -23,7 +23,7 @@ func main() {
|
|||||||
// you need to find the starting and ending position of the first rune
|
// you need to find the starting and ending position of the first rune
|
||||||
|
|
||||||
// 1st way: `for range`
|
// 1st way: `for range`
|
||||||
// you can't get the runes by range overing a byte slice
|
// you can't get the runes by ranging over a byte slice
|
||||||
// first, you need to convert it to a string
|
// first, you need to convert it to a string
|
||||||
var size int
|
var size int
|
||||||
for i := range string(word) {
|
for i := range string(word) {
|
||||||
|
Reference in New Issue
Block a user