Re:What about K?
by dzaima on Monday February 10, 2025 @08:04PM
(#43007645)
There might also be the option of just optimistically assuming that, for points in a file with a sequence of like >4K bytes of proper newlines with proper comma counts in each, that here probably isn't in the middle of a multiline string, and parsing it as such (of course with proper fallback if this turns out false; but you'll at least know that this whole run is in the middle of a multiline string).
Also, if you encounter a double-quote character anywhere with a comma on one side and neither a newline nor comma on the other, you immediately know 100% whether it starts or ends a string.
Also, if you encounter a double-quote character anywhere with a comma on one side and neither a newline nor comma on the other, you immediately know 100% whether it starts or ends a string.