Given a certain string, e.g., s = "tesX123"
, how can I replace a certain character at a certain location?
In this example, the character at position 4
should be changed to "t"
.
Does a method exist in the style of setChar(s, 4, "t")
which would result in test123
?