【问题标题】:Is there a .NET library that can do string permutations or string expansion?是否有可以进行字符串排列或字符串扩展的 .NET 库?
【发布时间】:2010-01-14 16:45:59
【问题描述】:

我正在寻找的是一些库或一些类代码,它们可用于将构造字符串扩展为变体和排列。类似于以下内容(语法是我的,可能不同):

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

虽然自己构建它不会太难,但如果它存在,为什么还要重新发明轮子?

【问题讨论】:

    标签: c# .net permutation


    【解决方案1】:

    这不符合你的语法,但我在一些项目中使用它并且运行非常流畅:Permutations, Combinations, and Variations using C# Generics

    【讨论】:

    • 看起来像在做我需要的。让我试试看。
    猜你喜欢
    • 1970-01-01
    • 2017-10-22
    • 2013-12-07
    • 2021-03-14
    • 1970-01-01
    • 2011-10-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多