3 ms·
You then need to escape characters that aren't legal in C string literals (such as double quotes, newlines and nul), and that's a lot more work than just conver
by plorkyeran 12y ago
You then need to escape characters that aren't legal in C string literals (such as double quotes, newlines and nul), and that's a lot more work than just converting the whole string. Also, string literals add a trailing nul byte, which is easy enough to deal with, but is also easy to forget about.
- MagicWishMonkey 12y agoI'm lazy and typically just base64 it ;)