标签:font size desktop bst pat ring contains substr utils
//获取路径中最后的\\之前的内容
String storePath = StringUtils.substringBeforeLast("C:\\Users\\mzc\\Desktop\\test.xlsx","\\")
//判断字符串中是否含有另一个字符串,有则替换掉,没有使字符串为空
String a = "qwerty"
a = a.contains("qwe") ?a.replace("qwe", "") : "";
标签:font size desktop bst pat ring contains substr utils
原文地址:https://www.cnblogs.com/mzc--/p/11592296.html