Detecting Digits with PowerShell
A person can look at a number and determine which digits are present. How would a script achieve this?
Table of contents TL; DR How to think about the problem Working with a number in PowerShell [System.Math]::DivRem Using DivRem to detect a digit Using DivRem to detect a range of digits Contains Using .contains() to detect a digit Using .contains() to detect a range of digits Match Using -match to detect a specific digit Using -Match to detect a range of digits Split Using -split to detect a digit Using -split to detect a range of digits ASCII Method Using the ASCII value of a character to detect unique digits in a number Conclusion Acknowledgements TL; DR Have you ever wondered, how many unique digits are in a number?
