From time to time I go back to my answers to see if I can improve something based on knowledge I gained in the meantime.
Some time ago I gave this answer and it was well received as you can see.
I referenced a different answer because it contains code ready to use and my answer basically points out how to use this code (literally what should the initial string value) to solve this particular problem.
These two questions are not duplicates because one is about integers and the other is about strings. Surprisingly enough with this particular requirement (Generate random integer with ALL digits from 1-9) it's easier and more efficient to start with string and convert it to integer after processing.
So, my question is: Should I include the code from other answer for a different question to make my answer complete? Or do we rather want to keep this site free of redundancy as much as possible?
Despite there is nothing more to add (except for the code) to my answer, it may look like a link-only answer until you read it.