From: Eric Wong Date: 2017-01-06T21:30:08+00:00 Subject: [ruby-core:78999] Re: [Ruby trunk Bug#13110] Byte-based operations for String Kirk Haines wrote: > 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. Agreed to some extent. I think we could also use a byteslice! bang method to efficiently deal with partial writes. But then, ! probably isn't safe on user-supplied data with Rack or most frameworks; only a custom vertically-integrated network apps... For reading and parsing operations, I'm not sure they're needed because IO#read/read_nonblock/etc all return binary strings when passed explicit length arg; and //n exists for Regexp. (And any socket server reading without a length arg would be dangerous) Unsubscribe: