I have a char array (char* url), that I would like to remove the first X chars from, what are some different ways to accomplish this? Copy to a second char array leaving off the first X chars? Change the pointer from url[0] to url[1]? Any examples?
char c_Array[ 50 ];
//Or
char *c_Array = new char[ 50 ]; //Dynamic, I would stay away from this...
void setup(){
//You can move the pointer forward.
char *c_MovedPtr = c_Array + 24;
//or
char *c_MovedPtr = &c_array[ 24 ];
//Or you could roll the data back
//x = distance
for( int i = x ; i < 50 ; ++i ){
c_array[ x - i ] = c_array[ i ];
}
return;
//You could move the data into a new location with out the unneeded data...
}
Excellent, thank you. I opted for moving the pointer forward.