Reputation: 12214
Hi I have a credit card number as a String. I need to apply a mask to hide the CC number:
I have "123-123-123" and I need to get something like "123-XXX-123"
Is there any elegant way to do this? I'm trying to avoid using severals substring() functions...
Thanks in advance
Upvotes: 1
Views: 5668
Reputation: 2763
I believe you can achieve this using PADLeft and PADRight functions of String class.
Upvotes: 0