Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (startIndex == word.Length)
- {
- result.Add(new string(word));
- return;
- }
- if (char.IsLetter(word[startIndex]))
- {
- AlternateCharCases(word.ToArray(), startIndex + 1, result);
- word[startIndex] = Char.ToUpper(word[startIndex]);
- AlternateCharCases(word.ToArray(), startIndex + 1, result);
- }
- else
- {
- AlternateCharCases(word, startIndex + 1, result);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement