Those operations string of

// Get content before the last path \\ 
String storepath StringUtils.substringBeforeLast = ( "C: \\ MZC the Users \\ \\ \\ test.xlsx Desktop", "\\")
// determines whether the string contain another string, there is replaced, there is no character string is empty
string a = "qwerty"
a = a.contains("qwe") ?a.replace("qwe", "") : "";
 

Guess you like

Origin www.cnblogs.com/mzc--/p/11592296.html