MCPcopy Create free account
hub / github.com/google/re2j / findUTF8Index

Method findUTF8Index

java/com/google/re2j/RE2.java:632–638  ·  view source on GitHub ↗
(byte[] b)

Source from the content-addressed store, hash-verified

630 */
631 // This is visible for testing.
632 int[] findUTF8Index(byte[] b) {
633 int[] a = doExecute(MachineInput.fromUTF8(b), 0, UNANCHORED, 2);
634 if (a == null) {
635 return null;
636 }
637 return Utils.subarray(a, 0, 2);
638 }
639
640 /**
641 * Returns a string holding the text of the leftmost match in {@code s} of this regular

Callers 1

testFindUTF8IndexMethod · 0.80

Calls 3

doExecuteMethod · 0.95
fromUTF8Method · 0.95
subarrayMethod · 0.95

Tested by 1

testFindUTF8IndexMethod · 0.64