How would one write a memmove-like function that copies bytes from one location to another, but at different intervals with either positive or negative values, and... without using a temporary buffer.
For example:
Code:
char *my_memmove(char *dst, char *src, size_t num, int dst_interval, int src_interval);
char str[11] = " A B C D E";
my_memmove(src + 9, src + 1, 5, -1, 2);
would result in the contents of str to be
I'm not asking anyone to write me a complete function (although that would be very kind of you,) just a link to a page or a basic idea that'll at least get me started into the right direction.
Thank you.