insertAt() function

use: insert character ch at position index in string when index is
valid, ignore otherwise.