readline(): Add ability to modify a string buffer