The list of methods to do String Ellipse are organized into topic(s).
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
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(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;