buffer-string

buffer-string is a built-in function in `C source code'.

(buffer-string)

Return the contents of the current buffer as a string.
If narrowing is in effect, this function returns only the visible part
of the buffer.