clip static method

String clip(
  1. String text
)

text, clipped to maxLineLength with the clipping stated in the line itself — so a reader who sees a suspiciously round line knows why.

Implementation

static String clip(String text) => text.length <= maxLineLength
    ? text
    : '${text.substring(0, maxLineLength)}… '
          '(${text.length - maxLineLength} more characters)';