C# Function that generates strings according to input
Posted
by mouthpiec
on Stack Overflow
See other posts from Stack Overflow
or by mouthpiec
Published on 2010-03-20T19:09:06Z
Indexed on
2010/03/20
19:11 UTC
Read the original article
Hit count: 133
Hi,
I need a C# function that takes 2 strings as an input and return an array of all possible combinations of strings.
private string[] FunctionName (string string1, string string2)
{
//code
}
The strings input will be in the following format:
String1 eg -> basement
String2 eg -> **a*f**a
Now what I need is all combinations of possible strings using the characters in String2 (ignoring the * symbols), and keeping them in the same character position.
Eg: baaement, baaefent, baaefena, basefent, basemena, etc
any help? :)
© Stack Overflow or respective owner