Hi
Am writing some code for which takes down new members information and creates them a username etc. It's all gone well apart from one bit of coding that i am having trouble with.
When a user types their chosen password in, say....STEVEN.....then on the summary page at the end i want it to show S****N as the password.
My code at the moment:
secpass = (password.charAt(0) + password.charAt(password.length-1));
Can anyone make any suggestions as to what to add to this so that the letters in the middle of the password are changed to '*'
It's easy to add * inbetween the first and last letter but just cant figure out how to make the amount of * the same as the amount of middle letters.
Any help appreciated.
n33712