You can’t, because strings are immutable. In most situations, you should simply construct a new string from the various parts you want to assemble it from.