[PATCH]support \r\n escape

This commit is contained in:
liuwentan
2023-10-25 15:36:05 +08:00
parent edab9520bd
commit 9f7c82e6b0
3 changed files with 75 additions and 0 deletions

View File

@@ -219,6 +219,12 @@ char *str_unescape(char *s)
case '\\':
s[j] = '\\';
break;
case 'r':
s[j] = '\r';
break;
case 'n':
s[j] = '\n';
break;
default:
s[j] = s[i];
i--; //undo the followed i++