Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Suggest ¶
Suggest finds the closest match for a given input string from a list of candidate strings. It uses the Levenshtein distance algorithm to determine the closest match. If no candidate is within the specified threshold, an empty string is returned. The comparison can be case-insensitive if the caseInsensitive flag is set.
Parameters: - input: the input string to match. - candidates: a slice of candidate strings to compare against the input. - threshold: the maximum Levenshtein distance considered for a match to be close enough. - caseInsensitive: if set to true, the matching will be case-insensitive.
Returns: - The closest match within the threshold, or an empty string if no match is close enough.
Types ¶
This section is empty.