trim function

String trim(
  1. String s
)

Removes whitespace from both ends of a string.

print(trim(' hello ')); // Outputs: 'hello'

Implementation

String trim(String s) => s.trim();