Module guih.lib.fuzzy_find

Functions for sorting and comparing strings in an "average" match way instead of fully comparing and providing similarity values

Functions

fuzzy_match (str, pattern) compares 2 strings and returns the percentage of similarity
sort_strings (tbl, pattern) sorts table by its keys depending on similiariry of the key to the pattern


Functions

fuzzy_match (str, pattern)
compares 2 strings and returns the percentage of similarity

Parameters:

  • str string the string to compare with the pattern
  • pattern string the pattern to compare the string with. pretty much just another string

Returns:

    number percentage of similarity
sort_strings (tbl, pattern)
sorts table by its keys depending on similiariry of the key to the pattern

Parameters:

  • tbl table the table to sort
  • pattern string the pattern to compare the keys with

Returns:

    table sorted table
generated by LDoc 1.4.6 Last updated 2022-06-23 16:51:50