I’d agree with mathume. Generally, I would not recommend implementing your own. Often people try to implement things which are a lot hard than they thought and they end up introducing bugs into the test tools (then you have to have tests for the tests; where does it end).
But in the case of generating all possible variables is a fairly fundamental skill.
When you look into this the first thing you find is permutations are different from combinations. In a combinations, 1, 2, 3 is the same as 3, 2, 1. But these are two different permutations.
If you really just want something you can plug strings into and don’t care about the implementation then you can just google “permutation generator” or “combination generator”.
If you are dealing with sensitive data and don’t want to post it online, you definitely want to search for “permutation generator algorithm” then implement the algorithm locally. Having a good, local permutation generator is a good idea. Sooner or later you will have to permute sensitive data and at that time you’ll be happy you have a local program you can use.