Java Utililty Methods String Left

List of utility methods to do String Left

Description

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

Method

Stringleft(String str, int size)
left
if (str == null || "".equals(str)) {
    return str;
if (size > 0) {
    if (size > str.length()) {
        return str;
    } else {
        return str.substring(0, size);
...
Stringleft(String string, int length)
Returns a portion of a string starting from the beginning for a designated amount of characters
return string.substring(0, length);
Stringleft(String text, int len)
left
return substring(text, 0, len);
Stringleft(String text, int max)
left
if (text.length() <= max)
    return text;
return text.substring(0, max - 3) + "...";
Stringleft(String value, int length)
left
String result;
if (value.length() <= length)
    result = value;
else
    result = value.substring(0, length);
return result;
Stringleft(String var0, int var1)
left
return var0 == null ? null : (var1 < 0 ? "" : (var0.length() <= var1 ? var0 : var0.substring(0, var1)));