MCPcopy Create free account
hub / github.com/diyhi/bbs / baseURI

Method baseURI

src/main/java/cms/utils/WebUtil.java:109–123  ·  view source on GitHub ↗

截取资源标识 @param uri 统一资源标识符 @param path 虚拟路径 @return

(String uri,String path)

Source from the content-addressed store, hash-verified

107 * @return
108 */
109 public static String baseURI(String uri,String path){
110 if(uri != null && !uri.isEmpty()){
111 if(path != null && !path.isEmpty()){
112 if(uri.length() > path.length() && uri.startsWith(path)){
113 uri = uri.substring(path.length());
114 }
115 }
116 //删除左斜杆
117 if(uri.startsWith("/")){
118 uri = uri.substring(1);
119 }
120 return uri;
121 }
122 return "";
123 }
124
125
126

Callers 3

addPVMethod · 0.95
getBaseInfoMethod · 0.95
preHandleMethod · 0.95

Calls 1

isEmptyMethod · 0.45

Tested by

no test coverage detected