removeLastNCharacters method

String removeLastNCharacters(
  1. int n
)

removeLastNCharacters: removes the last n characters

Implementation

String removeLastNCharacters(int n) {
  if (isNull) return "";
  return this!.substring(0, this!.length - n);
}