replaceItem

fun replaceItem(newItem: String, index: Int): String(source)

The replaceItem() method of the SVGStringList interface replaces an existing item in the list with a new item.

MDN Reference