Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ColdFusion - Better Way to show Credit Card - Hide Characters

Status
Not open for further replies.

NeighborhoodNerds

Programmer
Nov 13, 2012
2
I wanted to add this to this thread: thread232-186217
But it was closed...

So, here's a better way to handle what was being done:
CONCATENATE(REPT("•",len(SomethingSecret)-4),right(SomethingSecret,4))

Which would make something like this:
MySecretPassword

Look like:
••••••••••••word

Hope someone else finds this useful or when I forget how to do this Google will bring me back here...
 
Guess I should test my code first, there isn't a concatenate or rept function in ColdFusion and the bullet symbol crashes the script unless you double the #

So, now for the real coldfusion code:
RepeatString("&##149;",len(SomethingSecret)-4)&Right(SomethingSecret,4)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top