GtkStringSorter
GtkStringSorter — Sort by comparing strings
Functions
Properties
| GtkExpression * | expression | Read / Write |
| gboolean | ignore-case | Read / Write |
Types and Values
Object Hierarchy
GObject
╰── GtkSorter
╰── GtkStringSorter
Includes
#include <gtk/gtk.h>
Description
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.
Functions
gtk_string_sorter_new ()
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.
Parameters
expression | The expression to evaluate. | [transfer full][nullable] |
Returns
a new GtkStringSorter
gtk_string_sorter_get_expression ()
GtkExpression *
gtk_string_sorter_get_expression (GtkStringSorter *self); Gets the expression that is evaluated to obtain strings from items.
Parameters
self |
gtk_string_sorter_set_expression ()
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.
Parameters
self | ||
expression | a GtkExpression, or | [nullable][transfer none] |
gtk_string_sorter_get_ignore_case ()
gboolean
gtk_string_sorter_get_ignore_case (GtkStringSorter *self); Gets whether the sorter ignores case differences.
Parameters
self |
Returns
TRUE if self is ignoring case differences
gtk_string_sorter_set_ignore_case ()
void gtk_string_sorter_set_ignore_case (GtkStringSorter *self,gboolean ignore_case);
Sets whether the sorter will ignore case differences.
Parameters
self | ||
ignore_case |
|
Types and Values
GtkStringSorter
typedef struct _GtkStringSorter GtkStringSorter;
Property Details
The “expression” property
“expression” GtkExpression *
The expression to evaluate on item to get a string to compare with
[type GtkExpression]
Owner: GtkStringSorter
Flags: Read / Write
The “ignore-case” property
“ignore-case” gboolean
If matching is case sensitive
Owner: GtkStringSorter
Flags: Read / Write
Default value: TRUE
See Also
© 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