List of utility methods to do String Cut
String | cutString(String str, int length, String charsetName) cut String int len = str.getBytes(charsetName).length; if (len > length) { char[] chars = str.toCharArray(); int i = 0; for (; i < chars.length; i++) { String tstr = new String(chars, 0, i + 1); if (tstr.getBytes(charsetName).length > length) { i--; ... |