Comparison function that sorts an array using the given query. Uses a multi-level approach so that primary text matches weigh more than secondary. Sorts in descending order so the most matching strings appear first.
The query to sort by.
Comparison function that sorts an array using the given query. Uses a multi-level approach so that primary text matches weigh more than secondary. Sorts in descending order so the most matching strings appear first.