replacing a character in a String

how to, for example

do this:

function testReplace(){
var sentence = "roma";
sentence[0] = "c";.
print(sentence); //and expect "coma"
}

instead, there's an unity error that says Chars in String are read only.

There might be an easier method but you can remove the characters you don't wont and then insert the correct ones:

function testReplace(){
   var sentence = "roma";
   sentence = sentence.Remove(0,1);
   sentence = sentence.Insert(0,"c");
   print(sentence); //and expect "coma"
}