< :前の番号
^ :番号順リスト
> :次の番号
P :前の記事
N :次の記事
|<:スレッドの先頭
>|:次のスレッド
^ :返事先
_:自分への返事
>:同じ返事先を持つ記事(前)
<:同じ返事先を持つ記事(後)
---:分割してスレッド表示、再表示
| :分割して(縦)スレッド表示、再表示
~ :スレッドのフレーム消去
.:インデックス
..:インデックスのインデックス
On Fri, Jan 6, 2017 at 9:24 AM, <shugo / ruby-lang.org> wrote:
>
> I'm implementing a text editor, in which the point of a buffer is
> represented by a byte-based offset for speed.
> We can get substrings of a buffer by byteslice, but we need
> force_encoding(Encoding::ASCII_8BIT) to change
> the contents of a buffer because we don't have bytesplice:
>
I would agree. I have wished for byte based operations in Ruby strings ever
since the post 1.8.x changes were made, and have thought at various times
about just biting the bullet and implementing something for similar reasons
to yours.
My software makes use of buffers of network data where the character
encodings are irrelevant. They are just streams of bytes being moved
around, and sometimes manipulated along the way, and the byte based
operations that you propose would be extremely useful.
Kirk Haines
(supressed text/html)
Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>