C# Class ExampleMenu.Examples.Recording.LooseSelectUtil

Show file Open project: nerai/CMenu Class Usage Examples

Public Methods

Method Description
LooseSelect ( IEnumerable options, string find, System.StringComparison sc ) : string

Loose string comparison. Returns the best match using increasingly inaccurate comparisons. Also makes sure there is a sole match at that level of accuracy. Spaces in the select string are ignored. The levels are: Perfect match (abcd in abcd) Prefix match (ab in abcd) Containing match (bc in abcd) Matching ordered sequence of characters (bd in abcd) If no sufficiently unique match was found, a LooseSelectException is thrown.

Private Methods

Method Description
StringContainsSequence ( string str, string sequence, System.StringComparison sc ) : bool

Method Details

LooseSelect() public static method

Loose string comparison. Returns the best match using increasingly inaccurate comparisons. Also makes sure there is a sole match at that level of accuracy. Spaces in the select string are ignored. The levels are: Perfect match (abcd in abcd) Prefix match (ab in abcd) Containing match (bc in abcd) Matching ordered sequence of characters (bd in abcd) If no sufficiently unique match was found, a LooseSelectException is thrown.
public static LooseSelect ( IEnumerable options, string find, System.StringComparison sc ) : string
options IEnumerable
find string
sc System.StringComparison
return string