I'm looking to create a function that will return every possible string within a given string length, using a charset.
As an example, a charset of "abc", and a length of 2 should allow for 9 (3 ^ 2) unique combinations:
aa,
ab,
ac,
ba,
bb,
bc,
ca,
cb,
cc
(List constructed manually)
What method could be used to create such a function?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…