List of utility methods to do String Ellipse
double | ellipseCircum(double a, double b) Returns the approximate circumference of the ellipse defined by the specified minor and major axes. return Math.PI * (3 * a + 3 * b - Math.sqrt((a + 3 * b) * (b + 3 * a)));
|
double | ellipseCircumference(double a, double b) Estimate the circumference of an ellipse. if (a + b == 0) return 0; double aDb = a - b; double aPb = a + b; double diffSumQuotSq3 = 3 * (aDb / aPb) * (aDb / aPb); double dividend1 = diffSumQuotSq3; double divisor1 = 10 + Math.sqrt(4 - diffSumQuotSq3); return Math.PI * (a + b) * (1 + dividend1 / divisor1); ... |
String | ellipseString(StringBuilder builder, int maxLength) ellipse String String res; if (builder.length() > maxLength) { res = builder.substring(0, maxLength - 4) + "..."; } else { res = builder.toString(); return res; |
String | ellipsify(String message) Adds an ellipsis to the end of a string, generally indicating that this string leads to another choice (like a dialog) return message == null ? null : message + "..."; |
String | ellipsis(final String text, final int length) Ellipsis. return text == null ? "" : length == 0 ? text : text.length() > length ? text.substring(0, length - 3) + "..." : text; |
String | ellipsis(final String text, int length) ellipsis if (text.length() <= length) return text; return text.substring(0, length - 3) + "..."; |
String | ellipsis(String string, int length) Return a string that contains the original string, limited to the given number of characters. if (string.length() > length) { return string.substring(0, length - 3) + "..."; return string; |
String | ellipsis(String text, int max) ellipsis if (text.length() <= max) { return text; int end = text.lastIndexOf(' ', max - 1); return text.substring(0, end) + "..."; |
String | ellipsis(String text, int maxLength) ellipsis if (text == null) return null; if (text.length() > maxLength) { return text.substring(0, maxLength) + "..."; } else { return text; |
String | ellipsisString(String string, int len) ellipsis String String name = string; if (name.length() > len && (!name.contains(" "))) { name = name.substring(0, (len - 3)); name += "..."; return name; |