There seems to be a lack of these kinds of topics on Google, so here I am!
Anywho, I need to insert a character at specific areas of a string, but when I use to following code:
var test:String = "1,1,2,2,3,3";
trace(test.replace(test.slice(5,5), "%N"));
this is the output:
%N1,1,2,2,3,3
This strikes me as odd. Shouldn’t it be “1,1,2%N2,3,3” instead? Obviously, I’ve done something wrong along the way, but I’m not sure what I’ve done wrong or how to fix it.
Help! Thanks. :}