MCPcopy Index your code
hub / github.com/bazelbuild/bazel / newlines

Method newlines

src/test/java/net/starlark/java/eval/ScriptTest.java:346–354  ·  view source on GitHub ↗
(String s)

Source from the content-addressed store, hash-verified

344 }
345
346 private static int newlines(String s) {
347 int n = 0;
348 for (int i = 0; i < s.length(); i++) {
349 if (s.charAt(i) == '\n') {
350 n++;
351 }
352 }
353 return n;
354 }
355
356 // A trivial struct-like class with Starlark fields defined by a map.
357 private static class Struct implements StarlarkValue, Structure {

Callers 1

mainMethod · 0.95

Calls 2

charAtMethod · 0.80
lengthMethod · 0.45

Tested by

no test coverage detected