Reputation: 9488
Say I have an Int64
= 1234567890123456
(and we assume its a valid number), how can I format it into 1••• •••• •••• 3456
?
I've tried String.Format("{0:#••• •••• •••• ####}")
and String.Format("{0:0••• •••• •••• 0000}")
and both of them produce 123456789012••• •••• •••• 3456
which is wrong and completely defeats the point of obfuscating the number...
I'd appreciate some guidance. Thanks in advance!
Upvotes: 0
Views: 608
Reputation: 917
Wouldn't it be easier to just convert it to a string and fill in the specific chars?
string strNum = num.ToString().PadLeft(16,'0');
for(int i = 1; i < 12; i++) strNum[i] = '*';
something along those lines?
Upvotes: 2