Make bytes.Reader and strings.Reader have the same interface
This commit is contained in:
1 parent
dd63665b58
commit
0ed1300bd6
2 files changed
+135
-101
No files matched your search
@@ -4,9 +4,9 @@ import "core:io"
|
||||
import "core:unicode/utf8"
|
||||
|
||||
Reader :: struct {
|
||||
s: []byte,
|
||||
i: i64, // current reading index
|
||||
prev_rune: int, // previous reading index of rune or < 0
|
||||
s: []byte, // read-only buffer
|
||||
i: i64, // current reading index
|
||||
prev_rune: int, // previous reading index of rune or < 0
|
||||
}
|
||||
|
||||
reader_init :: proc(r: ^Reader, s: []byte) {
|
||||
|
||||
Reference in new issue
Block a user