Java Utililty Methods String Suffix

List of utility methods to do String Suffix

Description

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

Method

booleansuffix(String str, String suf)
suffix
return (str.length() >= suf.length())
        && (str.substring(str.length() - suf.length(), str.length()).equals(suf));
Stringsuffix(String string, final String suffix)
suffix
if (!string.endsWith(suffix)) {
    string += suffix;
return string;
Stringsuffix(String value, String prefix)
suffix
if (value == null)
    return prefix;
if (!value.endsWith(prefix))
    value += prefix;
return value;
String[]suffix(String[] columns, String suffix)
suffix
if (suffix == null)
    return columns;
String[] qualified = new String[columns.length];
for (int i = 0; i < columns.length; i++) {
    qualified[i] = suffix(columns[i], suffix);
return qualified;
StringsuffixClassName(String tableName)
suffix Class Name
String suffixClassName = getClassName(tableName);
return suffixClassName + ".java";
voidsuffixes(char[] x, int[] suff)
suffixes
int f = 0, g, i, m = x.length;
suff[m - 1] = m;
g = m - 1;
for (i = m - 2; i >= 0; --i) {
    if (i > g && suff[i + m - 1 - f] < i - g)
        suff[i] = suff[i + m - 1 - f];
    else {
        if (i < g)
...
StringsuffixLabel(String label, String tagSuffix)
suffix Label
if (label.startsWith(":"))
    label = label.substring(1);
if ("".equals(tagSuffix))
    return label;
return label + tagSuffix;
StringsuffixName(String name)
suffix Name
final char first = name.charAt(0);
if (Character.isUpperCase(first)) {
    return name;
} else {
    return Character.toUpperCase(first) + name.substring(1);
StringsuffixNotNullStringOrDefault(String str, String defaultStr, String suffix)
suffix Not Null String Or Default
if (str == null) {
    return defaultStr;
return str + suffix;
StringsuffixWith(String receiver, char suffix, boolean ignoreCase)
suffix With
if (receiver != null && !receiver.isEmpty() && !endsWith(receiver, String.valueOf(suffix), ignoreCase)) {
    return receiver + suffix;
return orEmpty(receiver);