From: shugo@...
Date: 2017-01-07T00:55:45+00:00
Subject: [ruby-core:79000] [Ruby trunk Feature#13110] Byte-based operations	for String

Issue #13110 has been updated by Shugo Maeda.

Tracker changed from Bug to Feature

----------------------------------------
Feature #13110: Byte-based operations for String
https://bugs.ruby-lang.org/issues/13110#change-62410

* Author: Shugo Maeda
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
----------------------------------------
How about to add byte-based operations for String?

```
s = "���������������������������"
p s.byteindex(/������/, 4) #=> 18
x, y = Regexp.last_match.byteoffset(0) #=> [18, 24]
s.bytesplice(x...y, "���������")
p s #=> "������������������������������"
```



---Files--------------------------------
byteindex.diff (2.83 KB)


-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>