private void CharacterRecurseMustContain(int currentDepth, string baseString, char[] characters) { foreach (char character in characters) { string combined = string.Join(string.Empty, baseString, character); HashComparer.CheckStringMustContain(combined, mustContain, prefix, postfix); if (currentDepth + 1 < maxDepth) { CharacterRecurseMustContain(currentDepth + 1, combined, characters); } } }
public void StartCharactersComboSearchMustContain(string _mustContain, char[] characters) { mustContain = _mustContain; if (prefix + mustContain + postfix != string.Empty) { HashComparer.CheckString(mustContain, prefix, postfix); } if (maxDepth > 0) { foreach (char character in characters) { string charToStr = character.ToString(); HashComparer.CheckStringMustContain(charToStr, mustContain, prefix, postfix); if (maxDepth > 1) { CharacterRecurseMustContain(1, charToStr, characters); } } } }