Try the following threads.
Combinations
All possible combination of a string