Given a string of different characters, and a number n, generate all the ordered combinations with repetition, of length 1 to n, using those characters.
Another way to define it is to see the given characters as "custom" digits in the base (radix) of the number of characters, then the program should generate all the "numbers" with 1 to n digits in that base, however, leading "zeros" are included too.
The combinations should be ordered by their length (1 character first, then 2, etc), but other than that they can be in any order. You can choose the most convenient ways of handling input and output. Shortest code wins.
ab, 3 ->
0123456789, 2 ->