MCPcopy Create free account
hub / github.com/Berkeley-CS61B/skeleton-sp23 / allAs

Method allAs

lab07/tests/StringUtils.java:67–73  ·  view source on GitHub ↗

Returns a string of all 'a' of length LEN.

(int len)

Source from the content-addressed store, hash-verified

65
66 /** Returns a string of all 'a' of length LEN. */
67 private static String allAs(int len) {
68 StringBuilder sb = new StringBuilder();
69 for (int i = 0; i < len; i++) {
70 sb.append('a');
71 }
72 return sb.toString();
73 }
74
75 /** Returns true if S is all 'z'. False for empty strings */
76 public static boolean isAllzs(String s) {

Callers 1

nextStringMethod · 0.95

Calls 1

toStringMethod · 0.45

Tested by

no test coverage detected