Top | ![]() |
![]() |
![]() |
![]() |
#define IDE_COMPLETION_ITEM_CONST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), IDE_TYPE_COMPLETION_ITEM, IdeCompletionItem const))
gboolean ide_completion_item_match (IdeCompletionItem *self
,const gchar *query
,const gchar *casefold
);
void ide_completion_item_set_priority (IdeCompletionItem *self
,guint priority
);
gboolean ide_completion_item_fuzzy_match (const gchar *haystack
,const gchar *casefold_needle
,guint *priority
);
This helper function can do a fuzzy match for you giving a haystack and
casefolded needle. Casefold your needle using g_utf8_casefold()
before
running the query against a batch of IdeCompletionItem for the best performance.
score will be set with the score of the match upon success. Otherwise, it will be set to zero.
haystack |
the string to be searched. |
|
casefold_needle |
A |
|
priority |
An optional location for the score of the match. |
[out][allow-none] |