var myString = "hell"
let index = 4
let character = "o" as Character
myString.insert(
character, at:
myString.index(myString.startIndex, offsetBy: index)
)
print(myString) // "hello"
Careful: make sure that index is bigger than or equal to the size of the string, otherwise you'll get a crash.