Skip to content

Commit

Permalink
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1193,6 +1193,9 @@ public Object stringByteIndex(DynamicObject string, DynamicObject pattern, int o
}

// Port of Rubinius's String::previous_byte_index.
//
// This method takes a byte index, finds the corresponding character the byte index belongs to, and then returns
// the byte index marking the start of the previous character in the string.
@RubiniusPrimitive(name = "string_previous_byte_index")
@ImportStatic(StringGuards.class)
public static abstract class StringPreviousByteIndexPrimitiveNode extends RubiniusPrimitiveArrayArgumentsNode {

0 comments on commit 9def32d

Please sign in to comment.