MCPcopy Create free account
hub / github.com/ArtifexSoftware/mupdf / formatString

Method formatString

platform/java/example/PDFTrace.java:40–54  ·  view source on GitHub ↗
(String s, String suffix)

Source from the content-addressed store, hash-verified

38 }
39
40 protected String formatString(String s, String suffix) {
41 StringBuilder sb = new StringBuilder("(");
42 int n = s.length();
43 for (int i = 0; i < n; i++)
44 {
45 char c = s.charAt(i);
46 if (c == '(' || c == ')' || c == '\\')
47 sb.append('\\');
48 sb.append(c);
49 }
50 sb.append(')');
51 if (suffix != null)
52 sb.append(suffix);
53 return sb.toString();
54 }
55
56 protected String formatByteArray(byte[] array, String suffix) {
57 StringBuilder sb = new StringBuilder("<");

Callers 4

formatObjectArrayMethod · 0.95
op_TjMethod · 0.95
op_squoteMethod · 0.95
op_dquoteMethod · 0.95

Calls 2

lengthMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected