mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
encoding/csv: improve Reader docs (#6828)
This commit is contained in:
@ -28,6 +28,7 @@ pub mut:
|
||||
row_pos int
|
||||
}
|
||||
|
||||
// new_reader initializes a Reader with string data to parse
|
||||
pub fn new_reader(data string) &Reader {
|
||||
return &Reader{
|
||||
delimiter: `,`,
|
||||
@ -36,7 +37,8 @@ pub fn new_reader(data string) &Reader {
|
||||
}
|
||||
}
|
||||
|
||||
// read() reads one row from the csv file
|
||||
// read reads a row from the CSV data.
|
||||
// If successful, the result holds an array of each column's data.
|
||||
pub fn (mut r Reader) read() ?[]string {
|
||||
l := r.read_record()?
|
||||
return l
|
||||
|
Reference in New Issue
Block a user