I have a C string that looks like \"Nmy stringP\", where N and P can be any character. How can I edit it into \"my string\" in C?
\"Nmy stringP\"
\"my string\"
Further to @pmg's answer, note that you can do both operations in one statement:
char mystr[] = "Nmy stringP"; char *p = mystr; p++[strlen(p)-1] = 0;
This will likely work as expected but behavior is undefined in C standard.