I have a product number which I would like to format using a mask.
Example:
String productNumber = "0913014316";
String mask = "XX.XXX.XXX.XXX";
How do I get this following output: 09.13.014.316?
Can I use String.format()? Or maybe something else on the Android?
Thank you
I think writing this yourself instead of waiting for an answer here would be faster 🙂
You could do something like (pseudocode):