removeLast method

String removeLast()

Implementation

String removeLast() {
  if (queue.isNotEmpty) {
    String piece = queue.removeLast();
    charLength -= piece.length;
    endCursor -= piece.length;
    return piece;
  }

  throw StateError("No pieces in queue to remove");
}