MCPcopy Index your code
hub / github.com/apache/groovy / reverse

Method reverse

benchmark/bench/revcomp.java:21–31  ·  view source on GitHub ↗
(byte[] buf, int begin, int end)

Source from the content-addressed store, hash-verified

19 }
20
21 static void reverse(byte[] buf, int begin, int end) {
22 while (true) {
23 byte bb = buf[begin];
24 if (bb == '\n') bb = buf[++begin];
25 byte be = buf[end];
26 if (be == '\n') be = buf[--end];
27 if (begin > end) break;
28 buf[begin++] = map[be];
29 buf[end--] = map[bb];
30 }
31 }
32
33 public static void main(String[] args) throws IOException {
34 final byte[] buf = new byte[System.in.available()];

Callers 1

mainMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected