method

insert

insert(offset, fragment)
public

Inserts the passed string at specified codepoint offsets.

Example:

  'Café'.mb_chars.insert(4, ' périferôl').to_s # => "Café périferôl"