MCPcopy Index your code
hub / github.com/antlr/codebuff / getParent

Method getParent

output/java8/1.4.17/Misc.java:113–121  ·  view source on GitHub ↗
(String name)

Source from the content-addressed store, hash-verified

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

Callers 2

getPrefixMethod · 0.95
loadMethod · 0.95

Calls 1

lastIndexOfMethod · 0.45

Tested by

no test coverage detected