[ruby-core:118673] [Ruby master Feature#14919] Add String#byteinsert

Issue #14919 has been updated by ufuk (Ufuk Kayserilioglu). Given that we now have [`String#bytesplice` since Ruby 3.2](https://bugs.ruby-lang.org/issues/18598), these kinds of operations should be possible using `"xxxxx".bytesplice(byte_pointer, 0, other)` to insert bytes of `other` at `byte_pointer` and `"xxxxx".bytesplice(byte_pointer, num, "")` to remove `num` bytes at `byte_pointer`. ---------------------------------------- Feature #14919: Add String#byteinsert https://bugs.ruby-lang.org/issues/14919#change-109204 * Author: aycabta (aycabta .) * Status: Open ---------------------------------------- It's important for multibyte String editing. Unicode grapheme characters sometimes have plural code points. In text editing, software sometimes should add a new code point to an existing grapheme character. String#byteinsert is important for it. I implemented by pure Ruby in my code. https://github.com/aycabta/reline/blob/b17e5fd61092adfd7e87d576301e4e19a4d9e... -- https://bugs.ruby-lang.org/
participants (1)
-
ufuk (Ufuk Kayserilioglu)