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

Method getParent

output/java8/1.4.12/Misc.java:115–123  ·  view source on GitHub ↗
(String name)

Source from the content-addressed store, hash-verified

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

Callers 2

getPrefixMethod · 0.95
loadMethod · 0.95

Calls 1

lastIndexOfMethod · 0.45

Tested by

no test coverage detected