(byte[] b)
| 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 |