public static String trimFullSpace(String testStr) {
// ^[ *| *]*"表示以全角空格或半角空格开始的所有集合
// [ *| *]*$"表示以全角空格或半角空格结尾的所有集合
if (testStr == null || testStr == "")
return testStr;
testStr = testStr.trim();
String resultStr = testStr.replaceAll("^[ *| *]*", "").replaceAll(
"[ *| *]*$", "");
return resultStr;
}