Android Utililty Methods String Cut

List of utility methods to do String Cut

Description

The list of methods to do String Cut are organized into topic(s).

Method

StringcutString(String str, int length)
cut String
return cutString(str, length, "");
StringcutString(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) {
...
StringcutStringFromChar(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 "";