From: "Eregon (Benoit Daloze)" Date: 2022-01-26T20:56:44+00:00 Subject: [ruby-core:107296] [Ruby master Feature#13110] Byte-based operations for String Issue #13110 has been updated by Eregon (Benoit Daloze). Seems reasonable to me. ---------------------------------------- Feature #13110: Byte-based operations for String https://bugs.ruby-lang.org/issues/13110#change-96193 * Author: shugo (Shugo Maeda) * Status: Open * Priority: Normal ---------------------------------------- How about to add byte-based operations for String? ```ruby 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: