Splitting strings in C
Unnecessary code

This function is puzzling to me:


static void clearAndCopy(char *destination, const char *source, unsigned size) {
    memset(destination, 0, size);
    memcpy(destination, source, size);
}



Why do you need to clear the destination buffer when you are going to copy over it immediately afterwards?  All calls to this function could simply be replaced by calls to memcpy instead.

Memory leak

In split_free(), you forgot to free (*s)-&gt;tokens.

Allocation strategy

There are two things I would do differently with respect to how you allocate your tokens:


Instead of using realloc to dynamically resize your token array, I would prescan the input and determine how many tokens there will be, and just allocate once.  This avoids a possible \$O(n^2)\$ reallocation time.
Instead of allocating a buffer for each token and copying the token to it, I would make a single copy of the input string, and then have s-&gt;tokens[i] be pointers to the tokens within the single copy.