Clutter.TextBuffer.insert_text
Description: Reference for Clutter.TextBuffer.insert_text

### Virtual Method

# Clutter TextBufferinsert_text

#### Declaration [src]

    guint
    insert_text (
      ClutterTextBuffer* buffer,
      guint position,
      const gchar* chars,
      guint n_chars
    )

#### Description [src]

Inserts `n_chars` characters of `chars` into the contents of the buffer, at position `position`.

If `n_chars` is negative, then characters from chars will be inserted until a null-terminator is found. If `position` or `n_chars` are out of bounds, or the maximum buffer text length is exceeded, then they are coerced to sane values.

Note that the position and length are in characters, not in bytes.

Available since: | 1.10

#### Parameters

`position` | `guint`
| The position at which to insert text.
`chars` | `const gchar*`
| The text to insert into the buffer.
| The data is owned by the caller of the function.
| The value is a NUL terminated UTF-8 string.
`n_chars` | `guint`
| The length of the text in characters, or -1

#### Return value

Returns: | `guint`
| The number of characters actually inserted.