skipLast method

String skipLast(
  1. int count
)

Returns the string prefix without the last count characters. If count is larger than length return the empty string.

Implementation

String skipLast(int count) => substring(0, max(length - count, 0));