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

Method forwardSlash

src/org/opensourcephysics/controls/XML.java:210–220  ·  view source on GitHub ↗

Replaces backslashes with slashes. @param path the path @return the path with forward slashes

(String path)

Source from the content-addressed store, hash-verified

208 * @return the path with forward slashes
209 */
210 public static String forwardSlash(String path) {
211 if(path==null) {
212 return ""; //$NON-NLS-1$
213 }
214 int i = path.indexOf("\\"); //$NON-NLS-1$
215 while(i!=-1) {
216 path = path.substring(0, i)+"/"+path.substring(i+1); //$NON-NLS-1$
217 i = path.indexOf("\\"); //$NON-NLS-1$
218 }
219 return path;
220 }
221
222 /**
223 * Gets the name from the specified path.

Callers 15

readJarMethod · 0.95
saveMethod · 0.95
saveAsMethod · 0.95
saveTabSetMethod · 0.95
actionPerformedMethod · 0.95
getTreePathMethod · 0.95
getAbsolutePathMethod · 0.95
setSelectedNodeMethod · 0.95
openMethod · 0.95
LaunchSetMethod · 0.95
getHTMLStringMethod · 0.95
refreshMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected