Skip to main content

buffer_to_text

Function buffer_to_text 

Source
pub fn buffer_to_text(buf: &Buffer) -> String
Expand description

Convert a Buffer to a plain text string.

Each row becomes one line. Empty cells become spaces. Continuation cells (trailing cells of wide characters) are skipped so wide characters occupy their natural display width in the output string.

Grapheme-pool references (multi-codepoint clusters) are rendered as ? repeated to match the grapheme’s display width, since the pool is not available here. This ensures each output line has consistent display width.