Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
I really like the idea of this solution; scanning the data pointer around the edge then moving to the inner edge! Seems like everyone else, myself included, did calculations to find the next element to copy instead of just moving it around. This is much easier to read, I would imagine.
It is, and you do so by callocing instead of mallocing (which may allocate non-zeroed memory). Without it you y overrun the end of the space allocated for the string.