Top | ![]() |
![]() |
![]() |
![]() |
#define | IDE_COMPLETION_ITEM_CONST() |
IdeCompletionItem * | ide_completion_item_new () |
gboolean | ide_completion_item_match () |
void | ide_completion_item_set_priority () |
gboolean | ide_completion_item_fuzzy_match () |
gchar * | ide_completion_item_fuzzy_highlight () |
#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.