aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWesley Kerfoot <wjak56@gmail.com>2025-05-27 14:27:22 -0400
committerWesley Kerfoot <wjak56@gmail.com>2025-05-27 14:27:22 -0400
commitcac18b4aba41df093aa4cc3ccdc53588fe879882 (patch)
tree5af3aaeafaeab82abeed3081ed33df97594c552b
parentdb5c45602d927bb9dc8f1e9dc88ed4561e5991c3 (diff)
Fix incorrect CSV reader settings for example, fix typo in docs
-rw-r--r--core/encoding/csv/doc.odin2
-rw-r--r--core/encoding/csv/reader.odin2
2 files changed, 1 insertions, 3 deletions
diff --git a/core/encoding/csv/doc.odin b/core/encoding/csv/doc.odin
index bfeadafd6..7abe2be49 100644
--- a/core/encoding/csv/doc.odin
+++ b/core/encoding/csv/doc.odin
@@ -63,8 +63,6 @@ Example:
read_csv_from_string :: proc(filename: string) {
r: csv.Reader
r.trim_leading_space = true
- r.reuse_record = true // Without it you have to delete(record)
- r.reuse_record_buffer = true // Without it you have to each of the fields within it
defer csv.reader_destroy(&r)
csv_data, ok := os.read_entire_file(filename)
diff --git a/core/encoding/csv/reader.odin b/core/encoding/csv/reader.odin
index 5348624d5..577ef219d 100644
--- a/core/encoding/csv/reader.odin
+++ b/core/encoding/csv/reader.odin
@@ -130,7 +130,7 @@ reader_destroy :: proc(r: ^Reader) {
for record, row_idx in csv.iterator_next(&r) { ... }
TIP: If you process the results within the loop and don't need to own the results,
- you can set the Reader's `reuse_record` and `reuse_record_reuse_record_buffer` to true;
+ you can set the Reader's `reuse_record` and `reuse_record_buffer` to true;
you won't need to delete the record or its fields.
*/
iterator_next :: proc(r: ^Reader) -> (record: []string, idx: int, err: Error, more: bool) {