startsWithSimilarities method

List<SimilarityIndex> startsWithSimilarities(
  1. Iterable<String> terms
)

Returns an ordered list of starts-with similarity values for the terms, in descending order of SimilarityIndex.similarity.

The String and terms are converted to lower-case and trimmed for the comparison.

Not case sensitive.

Implementation

List<SimilarityIndex> startsWithSimilarities(Iterable<String> terms) =>
    startsWithSimilarityMap(terms)
        .entries
        .map((e) => SimilarityIndex(e.key, e.value))
        .sortBySimilarity();