### Method

# Gtk EntryCompletion compute_prefix

deprecated: 4.10

#### Declaration [src]

    char*
    gtk_entry_completion_compute_prefix (
      GtkEntryCompletion* completion,
      const char* key
    )

#### Description [src]

Computes the common prefix that is shared by all rows in `completion` that start with `key`.

If no row matches `key`, `NULL` will be returned. Note that a text column must have been set for this function to work, see `gtk_entry_completion_set_text_column()` for details.

Deprecated since: 4.10

GtkEntryCompletion will be removed in GTK 5.

#### Parameters

`key`

  Type: `const char*`

  The text to complete for.

  The data is owned by the caller of the method.
  The value is a NUL terminated UTF-8 string.

#### Return value

Type: `char*`

The common prefix all rows starting with `key`.

The caller of the method takes ownership of the data, and is responsible for freeing it.
The return value can be `NULL`.
The value is a NUL terminated UTF-8 string.