You have to get the combinations of the string first into a descending number of buckets, then permute on each combination bucket. For example, if your string has 3 characters:
Combinations of "ABC" choose 3 = 1
Combinations of "ABC" choose 2 = 3
Combinations of "ABC" choose 1 = 3
Thus, you need to find the permutations of each of these 7 cases. In pseudocode:
int lenString = s.length
int[] all_permutations = new array
for( buckets = 1 to lenString ){
int[] c = Combinations( s, buckets )
int[] p = Permutations( c )
all_permutations += p
}