handle empty buffer in bf_buffer_extract()
add bf_buffer_extract_string()