take method
Implementation
String take(int count, {bool ellipsis = true, String fill = "", bool useRunes = false}) {
if (useRunes) {
final length = runes.length;
if (length <= count) {
return this;
}
return "${String.fromCharCodes(runes.toList().sublist(0, count))}${ellipsis ? "..." : ""}$fill";
}
if (length <= count) {
return this;
}
return "${substring(0, count)}${ellipsis ? "..." : ""}$fill";
}