trim function

String trim(
  1. String str
)

Implementation

String trim(String str) {
  return str.replaceAll(new RegExp(r"^\s+|\s+$"), '');
}