[Add] URLs 增加一个工具类;

This commit is contained in:
LamGC 2020-04-16 17:10:12 +08:00
parent 5ad2a56ce2
commit 4304cfcef2

View File

@ -0,0 +1,13 @@
package net.lamgc.cgj.util;
public final class URLs {
private URLs() {}
public static String getResourceName(String url) {
int startIndex = Math.max(url.lastIndexOf("\\"), url.lastIndexOf("/"));
return url.substring(startIndex + 1);
}
}