Can anyone please help me? I need to remove the first character from a char * in C.
char *
For example, char * contents contains a \'\\n\'
char * contents
\'\\n\'
if (contents[0] == '\n') memmove(contents, contents+1, strlen(contents));
Or, if the pointer can be modified:
if (contents[0] == '\n') contents++;