What is the opposite of String.charAt()
??
If I Have a string:
var Str:String="Hello World";
How do I change the 5th character, for example, from a ' ' to an '_'?
I can GET the 5th character like this:
var C:String=Str.charAt(5);
But how do I SET the 5th character?
Thanks in advance.
replace()
will replace the first instance it finds of the character retrieved fromcharAt(4)
and not necessarily the instance at index 4. If B == "bellborn", it would become "wellborn" rather than "bellworn". – Stewart