MCPcopy Create free account
hub / github.com/antlr/codebuff / getParent

Method getParent

output/java/1.4.17/Misc.java:117–125  ·  view source on GitHub ↗
(String name)

Source from the content-addressed store, hash-verified

115 }
116
117 public static String getParent(String name) {
118 //System.out.println("getParent("+name+")="+p);
119 if ( name==null ) return null;
120 int lastSlash = name.lastIndexOf('/');
121 if ( lastSlash>0 ) return name.substring(0, lastSlash);
122 if ( lastSlash==0 ) return "/";
123 //System.out.println("getParent("+name+")="+p);
124 return "";
125 }
126
127 public static String getPrefix(String name) {
128 if ( name==null ) return "/";

Callers 15

getPrefixMethod · 0.95
loadMethod · 0.95
getClassPathEntriesMethod · 0.45
getClassPathEntriesMethod · 0.45
getClassPathEntriesMethod · 0.45
getClassPathEntriesMethod · 0.45
getParentClosureMethod · 0.45
getDeltaToAncestorMethod · 0.45
getAncestorMethod · 0.45

Calls 1

lastIndexOfMethod · 0.45

Tested by

no test coverage detected