Added method to insert text at a certain offset of a string.