string_trimmer library

Functions

trim(String inputString, int length, {int? lastChars, bool? useUnicodeEllipsis}) String
Trims inputString to the given length. Optionally, a lastChars value can be provided to show the last lastChars characters of the string after the ellipsis. The ellipsis will always be counted as three characters when it comes to reaching the specified length. It uses three dots as the ellipsis by default, but setting useUnicodeEllipsis to true will use the Unicode ellipsis character U+2026 instead. Setting lastChars to 0 will cause th