Commit 6e334e5f31595186c422b15746abf4af17ea6631

Authored by wangbin
1 parent 3b89c0e4
Exists in master

1.fix a bug about trim

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
src/main/java/com/taover/util/UtilString.java
@@ -45,7 +45,7 @@ public class UtilString { @@ -45,7 +45,7 @@ public class UtilString {
45 } 45 }
46 46
47 Pattern pattern = Pattern.compile("\\S"); 47 Pattern pattern = Pattern.compile("\\S");
48 - int endIndex = source.length(); 48 + int endIndex = source.length()-1;
49 for(int i=source.length()-1; i>=0; --i){ 49 for(int i=source.length()-1; i>=0; --i){
50 char data = source.charAt(i); 50 char data = source.charAt(i);
51 if(pattern.matcher(data+"").find()){ 51 if(pattern.matcher(data+"").find()){