Every now and then we cant have nice data structures, so here are some handy functions to help with dealing with data with existing apis. All the functions require that they return a string that it is free'd using ffree().