strip method

String strip([
  1. String? character
])

The string without any leading and trailing whitespace and optional character

Implementation

String strip([String? character]) =>
    character != null ? leftStrip(character).rightStrip(character) : trim();