Java????·???????·??
???????????? ???????[ 2015/4/27 13:20:18 ] ????????Java ???·??
??????????????????·??
?????磺
????/opt/deve/tomcat/bin
????c:deve omcatin
??????????·??
????bin
????bin/data
????bindata
?????????????·??
?????????????????
??????/??? ???? ??????//?????·?? ????
??????/??? ???? ???????????·??
????????????·??
?????????????????
startsWith
public class Stringutil {
public static void main(String[] args) {
String path = "/opt/bin";
System.out.println(path.startsWith("/"));
}
}
?????????true
????indexOf
??????????
/**
* ????·?????????????·??????·??????true?????
*
* @param path
* @return
* @since 2015??4??21??
*/
public boolean isAbsolutePath(String path) {
if (path.startsWith("/") || path.indexOf(":") > 0) {
return true;
}
return false;
}
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11