Skip to content

Commit 74d7abe

Browse files
committed
Document some String primitives for clarity
1 parent 3d3b2eb commit 74d7abe

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/java/org/truffleruby/core/string/StringNodes.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4398,6 +4398,7 @@ protected int notValidUtf8(Object string, int byteIndex,
43984398
}
43994399
}
44004400

4401+
/** Search pattern in string starting after offset characters, and return a character index or nil */
44014402
@Primitive(name = "string_character_index", lowerFixnum = 2)
44024403
@NodeChild(value = "string", type = RubyNode.class)
44034404
@NodeChild(value = "pattern", type = RubyNode.class)
@@ -4508,6 +4509,7 @@ protected boolean patternFits(Rope stringRope, Rope patternRope, int offset) {
45084509
}
45094510
}
45104511

4512+
/** Search pattern in string starting after offset bytes, and return a byte index or nil */
45114513
@Primitive(name = "string_byte_index", lowerFixnum = 2)
45124514
@NodeChild(value = "string", type = RubyNode.class)
45134515
@NodeChild(value = "pattern", type = RubyNode.class)

0 commit comments

Comments
 (0)