Open Artoria2e5 opened 8 years ago
Hmm, should kill b597667...
Would it be easy to post-process the results to replace newlines with \n
?
Would it be easy to post-process the results to replace newlines with \n?
Doing so correctly requires more understanding of the escapes by re-parsing it... Somehow worse than sticking to the current assumption that newlines always get escaped.
Minor performance improvement from 11.331s to 10.937s.
Now it's able to hold arbitrary null-terminated bytes. (You may want to write some tests)
testdata.txt
An example of byte-safety:
Warning on newlines and grey-area undocumented behavior:
printf %q
only gives reusable strings, and there is no guarantee that the string will not contain newlines. The current (4.4) implementation does not produce newlines though: