List of utility methods to do String Cut
String | cutString(String str, int length) cut String return cutString(str, length, ""); |
String | cutString(String str, int length, String dot) cut String int strBLen = strlen(str, "GBK"); if (strBLen <= length) { return str; int temp = 0; StringBuffer sb = new StringBuffer(length); char[] ch = str.toCharArray(); for (char c : ch) { ... |
String | cutStringFromChar(String str1, String str2, int offset) cut String From Char if (isEmpty(str1)) { return ""; int start = str1.indexOf(str2); if (start != -1) { if (str1.length() > start + offset) { return str1.substring(start + offset); return ""; |