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

Method genMatch

java/com/google/re2j/Matcher.java:367–379  ·  view source on GitHub ↗

Helper: does match starting at start, with RE2 anchor flag.

(int startByte, int anchor)

Source from the content-addressed store, hash-verified

365
366 /** Helper: does match starting at start, with RE2 anchor flag. */
367 private boolean genMatch(int startByte, int anchor) {
368 // TODO(rsc): Is matches/lookingAt supposed to reset the append or input positions?
369 // From the JDK docs, looks like no.
370 boolean ok = pattern.re2().match(matcherInput, startByte, inputLength, anchor, groups, 1);
371 if (!ok) {
372 return false;
373 }
374 hasMatch = true;
375 hasGroups = false;
376 anchorFlag = anchor;
377
378 return true;
379 }
380
381 /** Helper: return substring for [start, end). */
382 String substring(int start, int end) {

Callers 3

matchesMethod · 0.95
lookingAtMethod · 0.95
findMethod · 0.95

Calls 2

re2Method · 0.80
matchMethod · 0.45

Tested by

no test coverage detected