Is there a standard C library function to escape C-strings?
For example, if I had the C string:
char example[] = "first line
second line: "inner quotes"";
And I wanted to print
"first line
second line: "inner quotes""
Is there a library function that will do that transformation for me? Rolling my own just seems a little silly.
Bonus points if I can give it a length to escape (so it stops before or beyond the
).
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…