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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Replacing a single character in a string

Status
Not open for further replies.

Jouster

Programmer
Dec 4, 2000
82
US
Hi,

I have a string and I need to replace a character in a certain position. There may be other characters in the string that are the same so I'm not sure replace() function will work correctly as I only want the one character changed.

example:
var myString = "00110011234"

want to change position 5 to a 1.

In c i would just say myString[5] = "1" but this doesn't seem to work here.

Thanks in advance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top