1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

final switch => match

This commit is contained in:
Alexander Medvednikov
2019-10-27 12:36:38 +03:00
parent acaf66ac80
commit 5946f67328
3 changed files with 32 additions and 25 deletions

View File

@ -51,12 +51,14 @@ pub fn (w mut Writer) write(record []string) ?bool {
if field.len > 0 {
z := field[0]
switch z {
case `"`:
match z {
`"` {
w.sb.write('""')
case `\r` || `\n`:
}
`\r`, `\n` {
w.sb.write(le)
}
}
field = field[1..]
}
}