src/swipl-devel/packages/xpce/man/refmanual/md/text_buffer.md

class text_buffer {#class-text_buffer}

A text_buffer forms the storage component of an editor object. It represents a text, possible with fragment objects defined on it.

Class text_buffer defines the primitive operations that can be done on text. The more user-oriented behaviour of an editor is defined with class editor. Among the operations are inserting text, deleting text, scanning for units such as words, lines and paragraphs, saving and loading, etc.

A text_buffer maintains a changes record that supports the implementation of ->undo.

A text_buffer can simultaneously be visualised by any number of editor objects.

@see class regex @see class editor @see topic Text @see class fragment

Instance variables {#class-text_buffer-instvars}

Send methods {#class-text_buffer-send}

Get methods {#class-text_buffer-get}



Try the rswipl package in your browser

Any scripts or data that you put into this service are public.

rswipl documentation built on June 16, 2026, 5:07 p.m.