StringTruncateMiddleExtensions extension
Truncate the middle of a string, keeping both ends visible.
- on
Methods
-
truncateMiddle(
int? maxLength, {String ellipsis = '…'}) → String -
Available on String, provided by the StringTruncateMiddleExtensions extension
Returns this string shortened tomaxLengthby replacing the middle withellipsis, keeping the start and end visible.