MCPcopy Create free account
hub / github.com/OpenSourcePhysics/osp / stripQuotes

Method stripQuotes

src/org/opensourcephysics/tools/DataTool.java:1061–1070  ·  view source on GitHub ↗

Strips quotation marks around a string. @param text the text to strip @return the stripped string

(String text)

Source from the content-addressed store, hash-verified

1059 * @return the stripped string
1060 */
1061 private static String stripQuotes(String text) {
1062 if (text.startsWith("\"")) { //$NON-NLS-1$
1063 String stripped = text.substring(1);
1064 int n = stripped.indexOf("\""); //$NON-NLS-1$
1065 if (n > -1 && n == stripped.length() - 1) {
1066 return stripped.substring(0, n);
1067 }
1068 }
1069 return text;
1070 }
1071
1072 /**
1073 * Parses a String into doubles separated by a specified delimiter. Unparsable

Callers 1

parseStringsMethod · 0.95

Calls 1

lengthMethod · 0.80

Tested by

no test coverage detected