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

Method findAllUTF8Index

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

Source from the content-addressed store, hash-verified

779 */
780 // This is visible for testing.
781 List<int[]> findAllUTF8Index(final byte[] b, int n) {
782 final List<int[]> result = new ArrayList<int[]>();
783 allMatches(
784 MachineInput.fromUTF8(b),
785 n,
786 new DeliverFunc() {
787 @Override
788 public void deliver(int[] match) {
789 result.add(Utils.subarray(match, 0, 2));
790 }
791 });
792 if (result.isEmpty()) {
793 return null;
794 }
795 return result;
796 }
797
798 /**
799 * {@code findAll} is the <a href='#all'>All</a> version of {@link #find}; it returns a list of up

Callers 1

testFindAllUTF8IndexMethod · 0.80

Calls 3

allMatchesMethod · 0.95
fromUTF8Method · 0.95
isEmptyMethod · 0.80

Tested by 1

testFindAllUTF8IndexMethod · 0.64