ensure buffer->string