C#字符串取出k个字节组合

static IEnumerable<string> foo(string metachars, int i)
        {
            var query = metachars.Select(x => x.ToString().AsEnumerable());
            while (query.First().Count() < i)
            {
                //var e1 = query.First();
                //var e2 = query.First().Count();
                query = query.SelectMany(x => metachars.Where(y => y > x.Last()).Select(y => x.Concat(y.ToString().AsEnumerable())));
            }
                
            return query.Select(x => string.Join(",", x));
        }

以上代码为拷贝网上的大神!

C#字符串取出k个字节组合

上一篇:window端口被占用问题


下一篇:windows下的nginx