GetBestMatch (open)

Find the best match for a string fiven a list of alternatives. Defaults to case insensitive match.

Syntax

LOADLIB "wh::util/comparisons.whlib";

STRING FUNCTION GetBestMatch(STRING name, STRING ARRAY alternatives, RECORD options)

Parameters

STRING name

Name to search

STRING ARRAY alternatives

Alternatives to choose from

RECORD options

Options

casesensitive

Do a case sensitive compare (defaults to FALSE)

Return value

STRING