List of utility methods to do String Suffix
boolean | suffix(String str, String suf) suffix return (str.length() >= suf.length())
&& (str.substring(str.length() - suf.length(), str.length()).equals(suf));
|
String | suffix(String string, final String suffix) suffix if (!string.endsWith(suffix)) { string += suffix; return string; |
String | suffix(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; |
String | suffixClassName(String tableName) suffix Class Name String suffixClassName = getClassName(tableName); return suffixClassName + ".java"; |
void | suffixes(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) ... |
String | suffixLabel(String label, String tagSuffix) suffix Label if (label.startsWith(":")) label = label.substring(1); if ("".equals(tagSuffix)) return label; return label + tagSuffix; |
String | suffixName(String name) suffix Name final char first = name.charAt(0); if (Character.isUpperCase(first)) { return name; } else { return Character.toUpperCase(first) + name.substring(1); |
String | suffixNotNullStringOrDefault(String str, String defaultStr, String suffix) suffix Not Null String Or Default if (str == null) { return defaultStr; return str + suffix; |
String | suffixWith(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); |