/**
* 去右侧空格
* @param str
* @return
*/
public static String trimRight(String str) {
if(StringUtils.isNotBlank(str)) {
return str.replaceAll("[ ]+$", "");
}
return null;
}
/**
* 去左侧空格
* @param str
* @return
*/
public static String trimLeft(String str) {
if(StringUtils.isNotBlank(str)) {
return str.replaceAll("^[ ]+", "");
}
return null;
}