I have to create a very inexpensive algorithm (processor and memory) to remove the first char
from a string (char array) in C.
I'm currently using:
char *newvalue = strdup(value+1);
free(value);
value = newvalue;
But I want to know if there is some less expensive way to do that. The string value
is dynamically allocated.
Reuse the original array. May or may not be faster, depend on the relative speed of memory (de)allocation and copy.