Is there a reason why this code should not produce "aZZZbc"?
function testInsert(){
var sentence = "abc";
sentence.Insert(1, "ZZZ");
print(sentence);
}
Is there a reason why this code should not produce "aZZZbc"?
function testInsert(){
var sentence = "abc";
sentence.Insert(1, "ZZZ");
print(sentence);
}
String.Insert() returns a string, you need to assign it to something.
e.g.
sentence = sentence.Insert(1,"ZZZ");