Closed Mart-Bogdan closed 7 months ago
@Mart-Bogdan , thank you for raising this issue.
Can you please explain it just skips current string (index)
and share a test scenario.
I have tried RandomString.GetStrings(Types.NUMBERS, 2, 10, false, true, forceOccuranceOfEachType: false)
, I did get 2 random strings
This is expected as the number of random strings will decreased when all characters are mandatorily used.
In this loop if this option is set
https://github.com/ljnath/RandomString4Net/blob/f01e28844ff909906fcf5cd08ab4aaaf9586a33e/RandomString4Net/RandomString.cs#L194-L206
it just skips current string (index) https://github.com/ljnath/RandomString4Net/blob/f01e28844ff909906fcf5cd08ab4aaaf9586a33e/RandomString4Net/RandomString.cs#L202-L203
But it should retry to generate non repetitive string.
P.S. same for second method
https://github.com/ljnath/RandomString4Net/blob/f01e28844ff909906fcf5cd08ab4aaaf9586a33e/RandomString4Net/RandomString.cs#L239-L240