ellipsize method

String ellipsize(
  1. int count
)

Implementation

String ellipsize(int count) {
  if (length > count) {
    return substring(0, count);
  } else {
    return this;
  }
}