Sets a character of the String. Has no effect on indices outside the existing length of the String.


myString.setCharAt(index, c)

Parameter Values

  • myString: a variable of type String.
  • index: the index to set the character at.
  • c: the character to store to the given location.

Return Values

  • Nothing

See Also

Please note: These are affiliate links. If you buy the components through these links, We may get a commission at no extra cost to you. We appreciate it.