Limit string into specific length.
String limitString(int length) { if (this.isEmpty) { return ""; } if (this.length <= length) { return this; } return this.substring(0, length); }