removeLastChar method

String removeLastChar()

删除最后一个字符

Implementation

String removeLastChar() {
  if (isEmpty) return this;
  return substring(0, length - 1);
}