Skip to content

Commit 71a5305

Browse files
committed
small update
1 parent 8a37328 commit 71a5305

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

content/posts/odin-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ substring: string = str[0:5] // "Hello"
667667
str := string(cstr) // O(n) conversion as it requires search from the zero-terminator
668668
```
669669

670-
When iterating a ``string``, the characters will be utf-8 runes and not bytes. ``for in`` assumes the string is utf encoded.
670+
When iterating a ``string`` with ``for in``, odin decodes the string utf-8 and produces ``rune`` values rather than bytes.
671671

672672
```odin
673673
str: string = "test"

0 commit comments

Comments
 (0)