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

Method pad

java/com/google/re2j/RE2.java:514–526  ·  view source on GitHub ↗
(int[] a)

Source from the content-addressed store, hash-verified

512 // an expression for \1. Pad returns a with -1s appended as needed;
513 // the result may alias a.
514 private int[] pad(int[] a) {
515 if (a == null) {
516 return null; // No match.
517 }
518 int n = (1 + numSubexp) * 2;
519 if (a.length < n) {
520 int[] a2 = new int[n];
521 System.arraycopy(a, 0, a2, 0, a.length);
522 Arrays.fill(a2, a.length, n, -1);
523 a = a2;
524 }
525 return a;
526 }
527
528 private interface DeliverFunc {
529 // Called iteratively with a list of submatch indices in the same

Callers 3

allMatchesMethod · 0.95
findUTF8SubmatchIndexMethod · 0.95
findSubmatchIndexMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected