Replaces n characters starting at the specified index with the new string.
"string" - the string to replace text in.
"new" - the new string to insert into the "string".
index - the index to insert the new string into
n - number of characters to remove starting at the index (defaults to length of "new")
A scalar string.
$string = "this is a test, really"; $string = replaceAt($string, "drill", 10, 4); println($string);
this is a drill, really