odin-lang / odin-lang.org

http://odin-lang.org
22 stars 81 forks source link

Incorrect (commented) output in String Iteration by bytes #146

Closed mahSource closed 8 months ago

mahSource commented 12 months ago

In the Overview there is this example https://odin-lang.org/docs/overview/#string-iteration

// by bytes - string length is in bytes
    for index in 0 ..< len(xstring) {
        fmt.println(index, xstring[index])
        // 0 A
        // 1 B
        // 2 C
    }

The output shown in comments is incorrect. Suggest to change the output shown in comments to what is actually output:

// 0 65
// 1 66
// 2 67