GtkStringSorter — Sort by comparing strings
GtkExpression * | expression | Read / Write |
gboolean | ignore-case | Read / Write |
GObject ╰── GtkSorter ╰── GtkStringSorter
#include <gtk/gtk.h>
GtkStringSorter is a GtkSorter that compares strings. 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.
To obtain the strings to compare, this sorter evaluates a GtkExpression.
GtkStringSorter *
gtk_string_sorter_new (GtkExpression *expression
);
Creates a new string sorter that compares items using the given expression
.
Unless an expression is set on it, this sorter will always compare items as invalid.
expression | The expression to evaluate. | [transfer full][nullable] |
a new GtkStringSorter
GtkExpression *
gtk_string_sorter_get_expression (GtkStringSorter *self
);
Gets the expression that is evaluated to obtain strings from items.
self |
void gtk_string_sorter_set_expression (GtkStringSorter *self
,GtkExpression *expression
);
Sets the expression that is evaluated to obtain strings from items.
The expression must have the type G_TYPE_STRING.
self | ||
expression | a GtkExpression, or | [nullable][transfer none] |
gboolean
gtk_string_sorter_get_ignore_case (GtkStringSorter *self
);
Gets whether the sorter ignores case differences.
self |
TRUE
if self
is ignoring case differences
void gtk_string_sorter_set_ignore_case (GtkStringSorter *self
,gboolean ignore_case
);
Sets whether the sorter will ignore case differences.
self | ||
ignore_case |
|
typedef struct _GtkStringSorter GtkStringSorter;
“expression”
property“expression” GtkExpression *
The expression to evaluate on item to get a string to compare with
[type GtkExpression]
Owner: GtkStringSorter
Flags: Read / Write
“ignore-case”
property“ignore-case” gboolean
If matching is case sensitive
Owner: GtkStringSorter
Flags: Read / Write
Default value: TRUE
© 2005–2020 The GNOME Project
Licensed under the GNU Lesser General Public License version 2.1 or later.
https://developer.gnome.org/gtk4/4.0/GtkStringSorter.html