lastChars method

String lastChars(
  1. int n
)

Implementation

String lastChars(int n) {
  if (n <= 0) return "";
  if (n >= length) return this;
  return substring(length - n);
}