1
1
Anderson Toshiyuki Sasaki c9ce8fa40b misc: Add a function to encode newlines
Given a string, the added function encodes existing newline characters
('\n') as the string "\\n" and puts into a given output buffer.

The output buffer must have at least 2 times the length of the input
string plus 1 for the terminating '\0'. In the worst case, each
character can be replaced by 2 characters.

Fixes T189

Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
2019-12-09 16:08:03 +01:00
..
2016-02-03 09:01:29 +01:00
2019-11-07 14:01:01 +01:00
2009-05-04 22:30:21 +00:00
2010-05-17 20:08:11 +02:00
2008-03-17 02:31:22 +00:00
2018-10-19 17:42:55 +02:00
2009-11-05 18:18:35 +01:00
2008-03-17 02:31:22 +00:00