Turn a buffer into a string with less effort