是否有一个.NET库,可以做字符串排列或字符串的扩展? [英] Is there a .NET library that can do string permutations or string expansion?

查看:132
本文介绍了是否有一个.NET库,可以做字符串排列或字符串的扩展?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找的是一些图书馆或可用于扩展建设串入的变化和排列类中的某些code。类似如下(语法是我,可能会有所不同):

What I'm looking for is some library or some code of classes that can be used to expand construction strings into variations and permutations. Something like the following (syntax is mine, may be different):

construction string: [Ff]oo [Bbß]ar|F(oo|oe)
output strings:
  Foo Bar
  foo Bar
  Foo bar
  foo bar
  Foo ßar
  foo ßar
  Foo
  Foe

虽然不会太辛苦建立这个自己,如果它的身边,为什么还要另起炉灶?

While it wouldn't be too hard to build this myself, if it's around, why bother reinventing the wheel?

推荐答案

这不会跟随你的语法,但我在一些项目中使用它,运行非常流畅:的排列,组合,并使用变异C#泛型

This doesn't follows your syntax, but I use it in some projects and runs very smooth: Permutations, Combinations, and Variations using C# Generics

这篇关于是否有一个.NET库,可以做字符串排列或字符串的扩展?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆