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

Method findAllUTF8

java/com/google/re2j/RE2.java:755–770  ·  view source on GitHub ↗
(final byte[] b, int n)

Source from the content-addressed store, hash-verified

753 */
754 // This is visible for testing.
755 List<byte[]> findAllUTF8(final byte[] b, int n) {
756 final List<byte[]> result = new ArrayList<byte[]>();
757 allMatches(
758 MachineInput.fromUTF8(b),
759 n,
760 new DeliverFunc() {
761 @Override
762 public void deliver(int[] match) {
763 result.add(Utils.subarray(b, match[0], match[1]));
764 }
765 });
766 if (result.isEmpty()) {
767 return null;
768 }
769 return result;
770 }
771
772 /**
773 * {@code findAllUTF8Index} is the <a href='#all'>All</a> version of {@link #findUTF8Index}; it

Callers 1

testFindAllUTF8Method · 0.80

Calls 3

allMatchesMethod · 0.95
fromUTF8Method · 0.95
isEmptyMethod · 0.80

Tested by 1

testFindAllUTF8Method · 0.64