"This is a string. " Rotate to : "his is a string. T" Rotate to : "is is a string. Th" .... I use it for LCD Display for Scroll.
Off the top of my head:
char* strrol (char* src) { char* d = src; char* s = d + 1; char c = *d; while (*s++) { *d++ = *s; } *d++ = c; *d = 0; } // strrol
void send (char* s, int offset) { int l = strlen(s); int i; for (i = offset; i < l; ++i) { OutputToLcd (s[i]); } for (i = 0; i < offset; ++i) { OutputToLcd (s[i]); } }