limitStringAppend method

String limitStringAppend(
  1. int length,
  2. String append
)

Limit string into specific length, and append another string.

Implementation

String limitStringAppend(int length, String append) {
  if (this.isEmpty) {
    return "";
  }

  return this.replaceRange(length, this.length, append);
}