// Smash all the colour codes.
// This smashes from the seed and will return a 
// pointer to the seed.  Do not use this if you
// don't want to change the original string.
// This also will no totally remove {, it adds in
// another one so it goes unnoticed.
char * smash_colour(char *buf) {
    char *ptr;
    for (ptr = buf; *ptr; ++ptr)
        if (*ptr == '{') {
            ++ptr;
            memmove(ptr, ptr-1, strlen(ptr-1));
        }
    return buf;
}