removeFirstLastChar method

  1. @useResult
String removeFirstLastChar()

Returns a new string with both the first and last characters removed.

Implementation

@useResult
String removeFirstLastChar() => (length < 2) ? '' : substringSafe(1, length - 1);