System.StringHelper.Match C# (CSharp) Méthode

Match() public static méthode

模糊匹配
public static Match ( IEnumerable list, String keys, Func keySelector, Int32 count, Double confidence = 0.5 ) : IEnumerable
list IEnumerable 列表项
keys String 关键字
keySelector Func 匹配字符串选择
count Int32 获取个数
confidence Double 权重阀值
Résultat IEnumerable
        public static IEnumerable<T> Match<T>(this IEnumerable<T> list, String keys, Func<T, String> keySelector, Int32 count, Double confidence = 0.5)
        {
            var rs = Match(list, keys, keySelector).Where(e => e.Value >= confidence);

            if (count >= 0)
                rs = rs.OrderByDescending(e => e.Value).Take(count);
            else
                rs = rs.OrderByDescending(e => e.Value);

            return rs.Select(e => e.Key);
        }
        #endregion

Same methods

StringHelper::Match ( String str, String key, Int32 maxError ) : Int32>.KeyValuePair
StringHelper::Match ( IEnumerable list, String keys, Func keySelector ) : Double>>.IEnumerable