MCPcopy Index your code
hub / github.com/OpenTSDB/opentsdb / stringify

Method stringify

src/tsd/GraphHandler.java:702–708  ·  view source on GitHub ↗

Formats and quotes the given string so it's a suitable Gnuplot string. @param s The string to stringify. @return A string suitable for use as a literal string in Gnuplot.

(final String s)

Source from the content-addressed store, hash-verified

700 * @return A string suitable for use as a literal string in Gnuplot.
701 */
702 private static String stringify(final String s) {
703 final StringBuilder buf = new StringBuilder(1 + s.length() + 1);
704 buf.append('"');
705 HttpQuery.escapeJson(s, buf); // Abusing this function gets the job done.
706 buf.append('"');
707 return buf.toString();
708 }
709
710 /**
711 * Pops out of the query string the given parameter.

Callers 1

setPlotParamsMethod · 0.95

Calls 3

escapeJsonMethod · 0.95
appendMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected