Gtk.StringSorter
Description: Reference for Gtk.StringSorter

### Class

# GtkStringSorter

#### Description [src]

    final class Gtk.StringSorter : Gtk.Sorter
    {
      /* No available fields */
    }

Sorts items by comparing strings.

To obtain the strings to compare, this sorter evaluates a `GtkExpression`.

It does the comparison in a linguistically correct way using the current locale by normalizing Unicode strings and possibly case-folding them before performing the comparison.

#### Hierarchy

#### Ancestors

- GtkSorter
- GObject

#### Constructors

###### gtk_string_sorter_new

Creates a new string sorter that compares items using the given `expression`.

#### Instance methods

###### gtk_string_sorter_get_collation

Gets which collation method the sorter uses.

since: 4.10

###### gtk_string_sorter_get_expression

Gets the expression that is evaluated to obtain strings from items.

###### gtk_string_sorter_get_ignore_case

Gets whether the sorter ignores case differences.

###### gtk_string_sorter_set_collation

Sets the collation method to use for sorting.

since: 4.10

###### gtk_string_sorter_set_expression

Sets the expression that is evaluated to obtain strings from items.

###### gtk_string_sorter_set_ignore_case

Sets whether the sorter will ignore case differences.

##### Methods inherited from GtkSorter (3)

###### gtk_sorter_changed

Notifies all users of the sorter that it has changed.

###### gtk_sorter_compare

Compares two given items according to the sort order implemented by the sorter.

###### gtk_sorter_get_order

Gets the order that `self` conforms to.

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

#### Properties

###### Gtk.StringSorter:collation

The collation method to use for sorting.

since: 4.10

###### Gtk.StringSorter:expression

The expression to evaluate on item to get a string to compare with.

###### Gtk.StringSorter:ignore-case

If sorting is case sensitive.

#### Signals

##### Signals inherited from GtkSorter (1)

###### GtkSorter::changed

Emitted whenever the sorter changed.

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

#### Class structure

    struct GtkStringSorterClass {
      GtkSorterClass parent_class;

    }

No description available.

###### Class members

`parent_class: GtkSorterClass`

  No description available.